Reputation: 309
I want to write an application using Active MQ as Queue with One producer many consumers. I found http://activemq.apache.org/multiple-consumers-on-a-queue.html that it can be done with creating session but that doesnt provide any example.Can anyone provide me an example of how to do that.
Thanks
Upvotes: 3
Views: 18255
Reputation: 905
I would go for a topic and durable subscribers. A topic will normally deliver the message to the first consumer dequeuing, but if durable subscribers have subscribed to the topic, messages will be delivered to each one of them.
Upvotes: 1
Reputation: 5779
What you are asking for is the functionality of a Topic, why not use that? Check out: http://activemq.apache.org/how-does-a-queue-compare-to-a-topic.html
Upvotes: 2
Reputation: 2225
Look at this example: http://www.java2s.com/Code/Java/J2EE/ThisexampleisasimpleJMSclientapplication.htm
Upvotes: 0