user160108
user160108

Reputation: 920

Vertx eventbus and verticle instances

We currently using 2 instances per verticle for our scaling needs, i just had a query regarding the evenBus publish.

If the eventBus publishes a message does this message get delivered to N instances of the verticle deployed?

DeploymentOptions().setInstances(2)
vertx.eventBus().publish("/event", Json.encodeToBuffer(message));

Upvotes: 0

Views: 253

Answers (1)

Alexey Soshin
Alexey Soshin

Reputation: 17731

Since your question is very short, I'll be very short too:

eventBus.publish() delivers the message to all listeners.

eventBus.send() delivers the message to a single listener.

Upvotes: 3

Related Questions