ActiveMQ 单消费者多生产者

发布于 2024-09-08 14:53:35 字数 81 浏览 2 评论 0原文

任何人都可以指出如何实施的参考 activemq 中的单个消费者多个生产者?或者可以给出一个非常简单的实现。 这将非常有帮助。

谢谢

Can anybody point out a reference on how to implement
a single consumer multiple producer in activemq? Or could give a very simple implementation.
This will be very helpful.

Thanks

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

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

发布评论

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

评论(3

我乃一代侩神 2024-09-15 14:53:35

Matt Raible 的 AppFuse 项目是一个很好的骨架项目,它是使用不同的库实现的。您可以选择使用 Spring 的一个并引入 ActiveMQ,正如 Bharati Raja 在他的博客文章 jms 中所解释的那样与appfuse1x

Matt Raible's AppFuse project is a good skeleton project which is implemented using different libraries. You can pick the one which uses Spring and introduce ActiveMQ as Bharati Raja has explained in his blog post jms with appfuse1x.

若有似无的小暗淡 2024-09-15 14:53:35

为此不需要特殊的实现。这是MessageBrokers的核心业务。您唯一需要确保的是:

如果您决定为生产者提供 ID,请确保它们彼此不同。您不能拥有多个具有相同 ID 的生产者。对于消费者来说也是如此。

There is no special implementation required for this. This is the core business of MessageBrokers. The only thing you need to make sure of:

If you decide to give an ID to your producers, make sure they are different from each other.. You cannot have multiple producers with the same ID. Same goes for consumers.

总攻大人 2024-09-15 14:53:35

如果您需要保证一条消息只能被一个消费者使用,那么这是 点对点通信模型,可以使用ActiveMQ中的JMS队列来实现。

许多生产者可以将消息发送到同一个队列。只有一个活跃的消费者将从队列中接收消息。

If you need to guarantee that a message can be consumed by only one consumer, then this is the point-to-point communication model which can be implemented using a JMS Queue in ActiveMQ.

Many producers can send messages to the same queue. Only one active consumer will receive a message from the queue.

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