javavert.xevent-busvertx-verticle

Vert.x events bus: publisher to not receive it's own message


I have 5 verticles: V{1..5}. All the verticles subscribed at "topic" and send message to "topic". Is there a way how to publish message in a way that it won't be sent to sender? For example, V1 publishes "message" and receives it as well. I want to avoid it. I need "message" sent by V1 to be delivered only to V{2..5}, but not to V1. Is it possible?


Solution

  • It's not possible out of the box. But you could add a header to the message which identifies the sender and filter messages in the consumer.