0
votes

I am using Spring's DefaultMessageListenerContainer to receive messages from an ActiveMQ queue. This application is the sole producer of messages to this queue. The application is clustered so in the case that I have two instances (instance1, instance2) how can I ensure that messages produced and sent to the queue from instance1 are received by the message listener on instance1 and messages produced and sent to the queue from instance2 are received by the message listener on instance2? My initial though was to set the messageSelector property of the DefaultMessageListenerContainer, but I'd like each application to have the same configuration.

1

1 Answers

0
votes

You can't do that; you either need a separate queue for each instance or use a message selector.