I had a similar situation with one implementation - we weren’t using the resequencer, but we required FIFO processing and we wanted to have the consumers/processers distributed across multiple containers. Since we required FIFO, only one of the deployed components could be processing at any given time.
I tried both the ZooKeeperRoutePolicy ( http://camel.apache.org/zookeeper.html <http://camel.apache.org/zookeeper.html> ) and ActiveMQ Exclusive Consumers ( http://activemq.apache.org/exclusive-consumer.html <http://activemq.apache.org/exclusive-consumer.html> ). Both techniques worked, but we were already using ActiveMQ as the message source and I didn’t have a readily available ZooKeeper cluster in production, so I picked the exclusive consumers. For what it’s worth ... > On May 12, 2016, at 4:54 AM, Siano, Stephan <[email protected]> wrote: > > Hi Claus, > > Thanks, that's what I also guessed from the code. Theoretically there are two > approaches how something like that could work in a distributed environment: > distribute the state somehow (with some replicated cache or something like > that) or limit the execution to one node at a time (with route policies?). > > Has anybody ever tried something like that (with or without success)? > > Best regards > Stephan > > -----Original Message----- > From: Claus Ibsen [mailto:[email protected]] > Sent: Donnerstag, 12. Mai 2016 11:06 > To: [email protected] > Subject: Re: Resequencer in distributed environment > > Its not distributed, and its in-memory only for a single camel context. > > On Thu, May 12, 2016 at 9:33 AM, Siano, Stephan <[email protected]> wrote: >> Hi, >> >> has anybody ever tried to use a resequencer in a distributed environment >> (e.g. with two cluster nodes doing message processing)? I am well aware that >> the sequencer pattern as such does not scale, but it might be necessary to >> have multiple cluster nodes for availability reasons or to scale out with >> other processing steps that are executed before the resequencer. >> >> From what I have found in the code the current resequencer implementation >> relies on running on instance, but the documentation does not say anything >> about it. >> >> Am I correct with my assumptions or did I miss something (e.g. some >> distributed sequencer implementation in some camel component)? >> >> Has anybody successfully used the resequencer in a HA scenario (and can give >> some hints about the approach used for that)? >> >> Best regards >> Stephan > > > > -- > Claus Ibsen > ----------------- > http://davsclaus.com @davsclaus > Camel in Action 2: https://www.manning.com/ibsen2
