ActiveMQ CMS:超过 1 个消费者如何在同一队列上接收相同的消息(我不希望发生负载平衡)?

发布于 2024-10-31 19:10:00 字数 461 浏览 1 评论 0原文

我已经设计和实现了我的框架,牢记rabbimq并且几乎完成了,但在最后一个状态,我必须转向activeMQ,所以目前,找到所有功能(我的设计所基于的)的等效性还有activeMQ。 在bried中,我有一个发布者,可以将带有路由键(主题)的任何消息发布到代理。现在,我可以有尽可能多的订阅者将其队列与该兴趣(主题)绑定,这样,每个订阅者都有自己的队列但相同的主题,代理将转发到与发布的主题消息绑定的每个队列和。此外,我的任何订阅者都可以死亡并再次回来,并且仍然可以看到那里未消费的消息并消费。 现在,在ActiveMQ中,有主题和队列的概念,具有不同的功能。我可以使用主题来实现上述目的,但是我的订阅者必须在代理收到已发布消息时一直被唤醒,否则它将丢失这些消息。如果我使用队列,那么它将是负载平衡的,在这种情况下,并非所有订阅者都会收到所有消息。 任何想法,我怎样才能在 ActiveMQ 的情况下获得相同的功能。 还。我正在使用 CMS API 来构建用 C++ 开发的框架。

谢谢 迪帕克

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 activeMQ, 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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

优雅的叶子 2024-11-07 19:10:00

您可能想研究使用 Apache Camel 来定义所需场景的路由,否则请查看镜像AMQ 文档中的队列和虚拟目标。

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.

征棹 2024-11-07 19:10:00

检查 JMS 实现提供者配置。您可以在那里指定最高优先级的消费者,一旦它开始接收消息,其他消费者将不会收到任何消息,除非活动的消费者失败。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文