Oct 19, 2016 1:48:00 PM com.hazelcast.cluster.ClusterService
INFO: [192.168.1.67]:5701 [dev] [3.6.3]
Members [2] {
Member [192.168.1.67]:5701 this
Member [192.168.1.76]:5701
}
Oct 19, 2016 1:48:01 PM com.hazelcast.partition.InternalPartitionServiceINFO: [192.168.1.67]:5701 [dev] [3.6.3] Re-partitioning cluster data... Migration queue size: 135-cluster-host - If the cluster option has also been specified then this determines which host address will be used for cluster communication with other Vert.x instances.
By default it will try and pick one from the available interfaces.
If you have more than one interface and you want to use a specific one, specify it here.
public static final String DEFAULT_CLUSTER_HOST = "localhost";
Inet4Address.getLocalHost().getHostAddress()Hi,Following this example https://github.com/vert-x3/vertx-examples/tree/master/core-examples/src/main/java/io/vertx/example/core/eventbus/pointtopoint and having the custom cluster.xml removed from my classpath, two verticles in two different machines pair together successfully(Hazelacast autodiscovery via multicast is achieved).Oct 19, 2016 1:48:00 PM com.hazelcast.cluster.ClusterService
INFO: [192.168.1.67]:5701 [dev] [3.6.3]
Members [2] {
Member [192.168.1.67]:5701 this
Member [192.168.1.76]:5701
}Oct 19, 2016 1:48:01 PM com.hazelcast.partition.InternalPartitionServiceINFO: [192.168.1.67]:5701 [dev] [3.6.3] Re-partitioning cluster data... Migration queue size: 135However the event bus messages fail to be received, unless I explicitly set the clusterHost in the VertxOptions.Isn't it a bit odd that the the verticles are paired by Hazelcast, but you have to explicitly set the clusterHost on each one?
Following the -cluster-host documentation, it mentions:-cluster-host - If the cluster option has also been specified then this determines which host address will be used for cluster communication with other Vert.x instances.By default it will try and pick one from the available interfaces.If you have more than one interface and you want to use a specific one, specify it here.However looking at the source code, I can see that the default host is always localhostpublic static final String DEFAULT_CLUSTER_HOST = "localhost";So it doesn't pick up an interface as the docs mention. It always uses localhost. This means that unless you explicitly set the cluster host, messages between different machines will not work.Wouldn't it be better for the default cluster host to be something like:Inet4Address.getLocalHost().getHostAddress()
that automatically picks up the local ip?Otherwise, the default options work only for cluster in the same machine, which is not the common case for clustering.
--
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+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/vertx.
To view this discussion on the web, visit https://groups.google.com/d/msgid/vertx/b56494ff-37dd-4f6c-9ffa-3305592f7546%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hi,Comments inline.
To unsubscribe from this group and stop receiving emails from it, send an email to vertx+un...@googlegroups.com.