FAQ
Hi there! We have the following integration scenario:

App 1 is deployed in a clustered jboss environment, minimum of 4 nodes with
state replication, and consumes messages from a Topic

App2 is running inside a glassfish and uses hazelcast internally.

So we deployed a route that consumes certain hazelcast events/messages and
forwards it to the clustered HornetQ Topic. That was a piece of cake, thanks
to camel.

Now, we face a little problem. We only want this route to be created once.
On every node of our jboss servers we have one camel context, so far that
was good, not a problem. But if we package the route with our app, it would
be create more than once, leading to duplicates being sent to the Topic.

We solved this using jboss infrastructure HA-Singleton deployment, so only
one active context with the route is present. But, it would be nice if we
could rely only on camel for that. Is this possible? I mean, would be great
if we could have camel in a cluster and decide that certain routes are the
type of singleton across the cluster. We even have some ideas on how to do
this using jgroups under the hood and our camel-cdi-extension. Just would
like to know if there's official support or a plan for that.

Kind Regards

Search Discussions

  • Ashwin Karpe at Sep 15, 2011 at 11:01 am
    Hi,

    I am not aware of any plan to do so. If you are interested in offering up
    your idea as a feature that the community could act on, can you please raise
    a Jira issue for it. This will raise the attention of the developers to what
    you are proposing and raise awareness about the use case.

    Thanks & Regards,

    Ashwin...

    -----
    ---------------------------------------------------------
    Ashwin Karpe
    Apache Camel Committer & Sr Principal Consultant
    FUSESource (a Progress Software Corporation subsidiary)
    http://fusesource.com

    Blog: http://opensourceknowledge.blogspot.com
    ---------------------------------------------------------
    --
    View this message in context: http://camel.465427.n5.nabble.com/Single-route-inside-cluster-tp4806241p4806383.html
    Sent from the Camel - Users mailing list archive at Nabble.com.
  • Vinicius Carvalho at Sep 15, 2011 at 12:37 pm
    Thanks for quick reply, created the issue:
    https://issues.apache.org/jira/browse/CAMEL-4454

    As mentioned we are experimenting it right now using jgroups and CDI
    extensions to add/remove the singleton routes.

    Hope this gets a chance to be promoted as a feature.

    Regards
    On Thu, Sep 15, 2011 at 12:00 PM, Ashwin Karpe wrote:

    Hi,

    I am not aware of any plan to do so. If you are interested in offering up
    your idea as a feature that the community could act on, can you please
    raise
    a Jira issue for it. This will raise the attention of the developers to
    what
    you are proposing and raise awareness about the use case.

    Thanks & Regards,

    Ashwin...

    -----
    ---------------------------------------------------------
    Ashwin Karpe
    Apache Camel Committer & Sr Principal Consultant
    FUSESource (a Progress Software Corporation subsidiary)
    http://fusesource.com

    Blog: http://opensourceknowledge.blogspot.com
    ---------------------------------------------------------
    --
    View this message in context:
    http://camel.465427.n5.nabble.com/Single-route-inside-cluster-tp4806241p4806383.html
    Sent from the Camel - Users mailing list archive at Nabble.com.
  • Boday at Sep 15, 2011 at 4:00 pm
    I ran into similar requirements and needed route level locking to
    single-thread execution across routes that act on the same data. These
    could be identical routes deployed in a cluster or different routes
    altogether that "act" on the same data.

    I was planning on adding this to Hazelcast (see CAMEL-4397), but am still
    investigating the options (see
    http://camel.465427.n5.nabble.com/discuss-implementing-Locks-in-Camel-td4775904.html
    this discussion ). My approach was geared towards blocking threads rather
    than not starting routes altogether, but I think the motivation is similar.
    Either way, Hazelcast seems to be applicable to both scenarios...

    Hopefully we can implement some form of this as I think the use case is
    becoming more common as more people are using clustered deployments of Camel
    these days...



    -----
    Ben O'Day
    IT Consultant -http://consulting-notes.com

    --
    View this message in context: http://camel.465427.n5.nabble.com/Single-route-inside-cluster-tp4806241p4807354.html
    Sent from the Camel - Users mailing list archive at Nabble.com.
  • Vinicius Carvalho at Sep 15, 2011 at 4:25 pm
    Hi Ben, looking at the discussion, I would say that our case falls exactly
    what Christian mentioned.

    We need only one active instance running. Others are either deactivated or
    have their producers replaced by a dumb producer (/dev/null).

    The idea is that if the main node with the route dies, we notify (we are
    using jgroups) the cluster, another one takes the place and then changes it
    producer to a real producer.

    We even have a scenario where we will cache things on all consumers, so in
    case of failure nothing gets lost.

    If this ever goes into main camel development I could contribute with some
    of our code.
    I also like the idea of the DSL support this: from().exclusive().to()

    Regards
    On Thu, Sep 15, 2011 at 4:59 PM, boday wrote:

    I ran into similar requirements and needed route level locking to
    single-thread execution across routes that act on the same data. These
    could be identical routes deployed in a cluster or different routes
    altogether that "act" on the same data.

    I was planning on adding this to Hazelcast (see CAMEL-4397), but am still
    investigating the options (see

    http://camel.465427.n5.nabble.com/discuss-implementing-Locks-in-Camel-td4775904.html
    this discussion ). My approach was geared towards blocking threads rather
    than not starting routes altogether, but I think the motivation is similar.
    Either way, Hazelcast seems to be applicable to both scenarios...

    Hopefully we can implement some form of this as I think the use case is
    becoming more common as more people are using clustered deployments of
    Camel
    these days...



    -----
    Ben O'Day
    IT Consultant -http://consulting-notes.com

    --
    View this message in context:
    http://camel.465427.n5.nabble.com/Single-route-inside-cluster-tp4806241p4807354.html
    Sent from the Camel - Users mailing list archive at Nabble.com.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupusers @
categoriescamel
postedSep 15, '11 at 9:43a
activeSep 15, '11 at 4:25p
posts5
users3
websitecamel.apache.org

People

Translate

site design / logo © 2022 Grokbase