Quantcast
Channel: Apache Timeline
Viewing all articles
Browse latest Browse all 5648

seda concurrency when sending messages to another route

$
0
0
Hi folks,

My understanding is that the seda queue is single-threaded by default, primarily by virtue of 'concurrentConsumers' defaulting to '1'. To me this means that the route will not pull another message off of the queue until the last one has completed processing. This is my desired behavior.

However, the route is getting quite long, and I'm wondering if it's possible to pass the message to another route while ensuring that the seda consumer will not pull another message off of the queue until that 'invoked' route has completed. I'm assuming this would be done via 'direct', possibly with a specific exchange pattern applied to one or both routes?

In the case I have in mind, the second/invoked route would end the processing chain, but is it possible to have such a pattern in the middle of a route as well, such that the message is passed to a route and the output of that route inserted back into the processing chain of the first route, almost like a subroutine? It seems like the enricher pattern could be (ab)used this way, but it doesn't seem like that is the intent.

Thanks!

Bob

Viewing all articles
Browse latest Browse all 5648

Trending Articles