开发者

ActiveMQ - sending message to specific consumer

Having single AMQ broker and 100 consumers connected. I would send the message to some specific consumer, so other consumers does not rec开发者_如何转开发eive it (client-side filtering won't work).

Simplest way is to create virtual destinations (name them queue:consumer-) for example and send messages there. However this will lead to 100 new queues which makes it more complex to monitor. Is there any other way to do this having single queue?


You could use JMS selectors.

You would designate a unique id to each of your consumers, the producer would have to know about those ids to send only to a specific consumer. The consumers have to collaborate, and set a selector to receive only messages designated to its own id as well messages designated to all/any of the consumers

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜