SEDA will queue messages. So you are basically taking messages off one queue and dropping them on to another as fast as possible.
I'm pretty sure that isn't the behavior you are after. It is more for queuing and asynchronous operations. Try changing route B to direct which is request response. Since you aren't specifying the number of threads, I believe the number defaults to one. I think what may be the confusion is the term blocking queue. That indicates that the consumer blocks if there aren't any objects to be pulled from the queue. It doesn't indicate that downstream operations execute sequentially. Also, I'd have to check but completion time out means it will time out if route B doesn't complete in that time. You likely don't need a time out at all if route B is a direct invocation since no further items will be removed from the queue until B completes. On Oct 21, 2016 1:37 PM, "Vince Iglehart" <vince.igleh...@kniferiver.com> wrote: > Hello, > I have some questions on how the SEDA component operates. I am using Camel > 2.17.3 in a non clustered environment. > > I have a scenario where I need to > 1. Accept multiple incoming messages using a webservice > 2. Aggregate messages using the $body of the message > 3. After a lapse of 3 seconds, call RouteB in the same Camel context. > 4. Allow RouteB to execute only when there is no message currently being > processed by RouteB. If there are new messages that come in, they must wait > until the current message is processed by RouteB. > > Here is what I have so far: > > from("cxf://example.com/incoming").aggregate(simple("${body}"), new > BodyInAggregatingStrategy()).completionTimeout(3000).to("seda:routeB"); > > from("seda:routeB").to(...) > > My understanding is that SEDA will block all incoming messages to RouteB > until the current message has been completed. Am I correct? Will this > design guarantee that only 1 "instance" of routeB will be running at a > time? > > > > > > -- > View this message in context: http://camel.465427.n5.nabble. > com/SEDA-with-Aggregation-tp5789103.html > Sent from the Camel - Users mailing list archive at Nabble.com. >