Hello Rob,

A follow-up question...

  • I don't really understand the distinction of routing the message to Queue (destination = INBOUND_PREFIX + componentName;) or Queue (destination = INBOUND_PREFIX + id.getContainerName();). Can you explain why the difference? It seems to be something like the "request" going to the remote container Queue, and the "response" is going to the component specific Queue - but why and what difference does it make since either way the remote MessageListener is the same isn't it?
The routing is done this way because queue's will load balance delivery of MessageExchanges. So you can have multiple component instances listening to the same Queue. However, the response needs to be sent back to the component that sent the exchange - as the sender could have sent the exchange synchronously  - and is waiting for a response.
Shouldn't the response Queue be unique?

ie shouldn't the container name also be part of the component-specific Queue name.

Otherwise there may be the same component name on multiple containers. Then if you are unlucky, they may both be expecting responses at the same time in which case there may be potential for them to consume the response intended for the other (same name) component....??

Does this make sense?

Thanks,
Peter.

Reply via email to