I have designed and implemented my framework keeping rabbimq in mind and was almost done with that, but at the last state, I have to move to activeM开发者_JAVA技巧Q, so currently, finding the equivalence of all the features (on which my design was based) in activeMQ as well. In bried, I had a publisher and can publish any message with the routing key (topic) to the broker. Now, I can have as many subscribers who have bound their queue with that interest (topic), in that way, every subscriber has its own queue but same topic, the broker will forward to every queue which is bound to the topic message was published with. Also, any of my subscriber can die and come back again and still see the un-consumed messages there and consume then. Now, in ActiveMQ, there is concept of topic and queues, have different functionalities. I can achieve the above using Topics, but my subscribers have to be awaken all the time broker recieves the published message otherwise it will loose those messages. If I use queues, then it will be load-balanced, in that case not all the subscribers will get all the messages. Any idea, how can I get the same functionality in the case of ActiveMQ as well. Also. I am using CMS APIs for my framework being develped in C++.
Thanks Deepak
You might want to look into using Apache Camel to define the routing for your desired scenario, otherwise take a look at mirrored Queues and Virtual destinations in the AMQ documentation.
Check the JMS implementation provider configuration. You can specify the highest priority consumer there and once it starts receiving the messages the others will not get any unless the active one fails.
精彩评论