ZooKeeper Clustering and localConsumers

54 views
Skip to first unread message

Pepe Barbe

unread,
Apr 3, 2021, 2:35:28 PM4/3/21
to vert.x
Hello everyone,

I have recently been experimenting into adding clustering functionality to an existing Vert.X application with ZooKeeper. I want the existing messaging that is using the Event Bus to stay local to the node and not be exposed to the cluster at all.

While playing around with a local setup I have noticed that after converting all my consumer to localConsumers, the event bus addresses are still being published to the __vertx.subs node; I see even all NetSocket write IDs that my application opens being published to ZooKeeper. This is not what I expected. If an address is being consumed locally only I would expect it would not be published to ZooKeeper. Also I have noticed that subscription addresses are not cleaned up after the fact, which is leaving many write IDs published as sockets come and go, which I expect could create unnecessary traffic on ZooKeeper.

Is my understanding correct of what local consumers correct? Is there a way to achieve that, where I can explicitly ensure what parts of the Event Bus can go through the cluster and which ones are local only?

Thank you,
Pepe

Thomas SEGISMONT

unread,
Apr 6, 2021, 4:23:49 AM4/6/21
to vert.x
Hi,

Since Vert.x 4 local consumers are also registered to the cluster manager. This is to ensure a correct distribution of messages for use cases that mix local and distributed consumers on the same address.

In Vert.x 4.0.3, there has been improvements in Hazelcast / Infinispan / Ignite cluster managers to handle local consumers.
I believe they could be applied to Zookeeper cluster manager too.

Would you like to contribute this? I can assist you in the process.

Regards

--
You received this message because you are subscribed to the Google Groups "vert.x" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vertx+un...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/vertx/15f296dc-559c-4aa2-86d4-2834aff2cf0en%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages