heat
heat

Reputation: 1

Jboss HornetQ multiple consumers

We have to connect to a third party hornetQ (Jboss 7). Currrently 3 instances of our application is running on different servers. We put a request on a queue say request_queue and the third party provider processes the request and puts the response on response_queue. Our application listens on the response_queue.

Now the problem is since we have 3 instances of our application, which means three consumers for the response_queue, how to guarantee that only one instance is receiving each response. We don't want all the instances to process the response only one has to process the response.

Any ideas how to achieve this?

Upvotes: 0

Views: 299

Answers (1)

jgitter
jgitter

Reputation: 3414

A JMS message on a Queue is point-to-point and is only processed once. A JMS message on a Topic is a broadcast that will be processed by all listeners.

Documentation: http://docs.oracle.com/javaee/6/tutorial/doc/bncdx.html

Upvotes: 1

Related Questions