[英]How can I prevent a producer to receive a message sent to a topic?
I am using ActiveMQ topics. 我正在使用ActiveMQ主题。 My applications create some topics, and create a producer and a consumer on theses topics. 我的应用程序创建了一些主题,并在这些主题上创建了生产者和消费者。
When a producer send something, it will receive back the message because there is also a consumer on this topic in the same topic. 当生产者发送东西时,它将收到消息,因为同一主题中也有该主题的消费者。
There is a topic dedicated for each application (different code, for different computer running it) and there is a main central core process that will join each topic to process messages, and will then reply to the topic where the request message have been posted. 有一个专门用于每个应用程序的主题(不同的代码,用于运行它的不同计算机),并且有一个主要的核心核心流程,它将结合每个主题来处理消息,然后回复已发布请求消息的主题。
Some topics are "general purpose" topics, where some messages won't have a reply, but that many process will take into account. 一些主题是“通用”主题,其中一些消息不会得到答复,但是会考虑很多过程。
Is there something in ActiveMQ that can prevents the producer to receive back what it sends ? ActiveMQ中是否有某些东西可以阻止生产者收回其发送的内容?
Edit : please note that I am quite a newbie with ActiveMQ, I am using it not so long ago, and with very basic settings : no persistence, as simple application bus 编辑:请注意,我是ActiveMQ的新手,不久前就使用它,并且具有非常基本的设置:没有持久性,就像简单的应用程序总线
When you create your consumer you can specify a message selector to exclude messages with your producer's unique ID. 创建消费者时 ,可以指定消息选择器以排除具有生产者唯一ID的消息。 Your producer can set its ID in a message property when creating its messages. 生产者可以在创建消息时在消息属性中设置其ID。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.