Reputation: 119
This is something that I haven't been able to find in the official documentation nor anywhere else yet; the situtation I propose is basically this:
N
Vert.x instances of the same service, same codebase.C
with an address A
cluster-wide. I subscribe a completion handler to get notified when the registration completes on all nodes of the cluster.My question is actually two-fold:
C
consumer be propagated to the new-joiner? That is, if I do a eventBus().publish(A, ...)
from the new-joiner, will the handler get executed?Upvotes: 0
Views: 218
Reputation: 9128
When you add a new node to the cluster, the app will be started again on this node (if if understood correctly the situation you described).
So on the new node, you'll register an EventBus consumer with for address A
cluster-wide.
The new node will be aware of all registrations created previously on the cluster. The previous nodes will be aware of the new registration.
When you do eventBus().publish(A, ...)
from the new-joiner, all nodes include it will invoke the consumer registered for this address.
On the new-joiner, the completion handler will be called when the registration has been persisted. There could be a (very small) delay before the new registration is visible from other nodes because the process is asynchronous.
The completion handler on previous nodes will not be invoked again (because the registration of the corresponding consumer already happened).
Upvotes: 1