vertx 3 clustered event bus issues

626 views
Skip to first unread message

Aaron Gooch

unread,
Oct 14, 2015, 2:32:43 PM10/14/15
to vert.x
Hi, 

I'm attempting to test sending messages via eventBus across a cluster. I am able to connect the services with hazelcast but I am not able to send messages via eventBus from one cluster member to another. 

The code is pretty simple...

The sender: 

vertx.setPeriodic(1000, msg -> {
  eventBus.send("ping.address", "ping!", reply -> {
if (reply.succeeded()) log.info("received a reply - " + reply.result());
else log.error("did not receive a reply");
});
});

The consumer:

vertx.eventBus().consumer("ping.address", callback -> {
log.info("got a ping message");
callback.reply("pong");
});

I've checked the vertx object to make sure it is a clustered Vertx and the logs show 2 Members in the cluster. Is there any way to observe what channels are available from the consumer side? The example code shows a registerHandler method (https://github.com/vert-x/vertx-examples/blob/master/src/raw/java/eventbus_pointtopoint/Receiver.java)  and I have a feeling that I am missing some step with event bus address registration.

Thanks in advance,
Aaron



Tim Fox

unread,
Oct 14, 2015, 3:02:23 PM10/14/15
to ve...@googlegroups.com
These kinds of questions have been answered many times on this group (including yesterday iirc) so it's certainly worth searching for similar threads.

Also there's a troubleshooting section in the clustering docs that should explain how to figure out problems like these.

HTH
--
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.
Visit this group at http://groups.google.com/group/vertx.
To view this discussion on the web, visit https://groups.google.com/d/msgid/vertx/f439b335-7ec6-4bcd-b8a5-2900bcf62a28%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Aaron Gooch

unread,
Oct 14, 2015, 4:16:14 PM10/14/15
to vert.x
Thanks for the reply Tim.

I've read the thread from yesterday. 

Are you saying that this is a clustering issue? The hazelcast logs report a 2 member cluster on both members. Is that false? 

-Aaron  
Screen Shot 2015-10-14 at 1.13.03 PM.png

Aaron Gooch

unread,
Oct 14, 2015, 6:54:52 PM10/14/15
to vert.x
Re-read the thread from the past few days which led me to disable the centos firewall and messages are working across the cluster.
Reply all
Reply to author
Forward
0 new messages