Hi Damien,

  from("jms:queue:queue1") reads messages once at a time.
Using from("jms:queue:q1?concurrentConsumers=2") may help but imply
consequences in terms of resources, thread safety, readability...

  In such a situation, I would avoid reusing q1 if possible. For instance,
you may be able to model the whole circuit in the dynamic router and do
something like:
  from(jms:queue:q1).dynamicRouter().method(DynamicRouterTest.class,
"nextStep");
  from(direct:p1).process(p1);
  from(direct:p2).process(p2);
  from(direct:p3).process(p3);

Hope this help,
Alex


On Sun, Sep 23, 2018 at 11:59 AM Damien Nicolas <dmn.nico...@gmail.com>
wrote:

> I have several Camel routes defining a "circuit" like this (where `qx` is
> the queue number x, `px` is the processor number x)
>
>     q1 -> p1 -> q2 -> p2 -> q1 -> p1 -> q3 -> p3 -> (...)
>
> as
>
>
>
> from("jms:queue:q1).process("p1").dynamicRouter().method(DynamicRouterTest.class,
> "nextStep");
>     from("jms:queue:q2).process("p2").to("jms:queue:q1");
>     from("jms:queue:q3).process("p3").to(...);
>
>
> As you can notice, I reuse the queue `q1` (for achitectural purpose), the
> `dynamicrouter` indicate dynamically the destination when a message comes
> from `q1`, but when the message arrives at `p2`, I get a timeout exception
> in this style:
>
>     2018-09-22 14:21:21,443 [Camel (camel-1) thread #6 -
> JmsConsumer[QueueTest]] WARN
> org.apache.camel.component.jms.EndpointMessageListener  - Execution of JMS
> message listener failed. Caused by: [org.apache.camel.RuntimeCamelException
> - org.apache.camel.ExchangeTimedOutException: The OUT message was not
> received within: 20000 millis due reply message with correlationID:
> ID:373034344443444200000000000000000000000000000000 not received.
>
> How can I make it works without disabling jms replying?
>
> --
> Damien NICOLAS
>

Reply via email to