Support for multicast discovery in Hazelcast client 3.x versions

159 views
Skip to first unread message

Amit Ohale

unread,
Aug 13, 2014, 12:22:04 PM8/13/14
to haze...@googlegroups.com
I am using Hazelcast 3.2 and I am able to use Hazelcast server node config xml file in client as well. 
With this, I am able to use multicast discovery mechanism in Hazelcast client, but I haven't seen any documents mentioning this feature. Is this a feature added in client and missing in document?

Amit Ohale

unread,
Aug 13, 2014, 3:57:09 PM8/13/14
to haze...@googlegroups.com
This sucks.. Hazelcast client doesn't complain if I am using server node xml and silently connects to localhost if I have a server node running on the same machine. 

michael...@gmail.com

unread,
Aug 13, 2014, 4:00:59 PM8/13/14
to haze...@googlegroups.com
I’m not sure about the client vs server XML issue but client multicast discover isn’t supported yet and I believe it is covered in issue 520: https://github.com/hazelcast/hazelcast/issues/520

-mike

--
You received this message because you are subscribed to the Google Groups "Hazelcast" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hazelcast+...@googlegroups.com.
To post to this group, send email to haze...@googlegroups.com.
Visit this group at http://groups.google.com/group/hazelcast.
To view this discussion on the web visit https://groups.google.com/d/msgid/hazelcast/b5524ed3-a8c8-4b86-8062-0d332d0d6e3e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Amit Ohale

unread,
Aug 13, 2014, 5:22:17 PM8/13/14
to haze...@googlegroups.com
This is covered in issue 520. It's just that till now I was thinking my client is using multicast for discovery mechanism, as hazelcast client instance never thrown any exception while starting using the server XML and connected to node running on localhost.

Now my guess is when hazelcast client failed to connect to any server node after parsing the server XML, it used the default client XML configuration present in hazelcast-client.jar which always connects to localhost. 

Even if this is expected behavior, client should log the name of xml as it's not the same configuration one expects it to be.

Example:

my-client-config.xml is same as server configuration with multicast discovery running with multiple nodes and one node on localhost and when I am creating the hazelcast instance it's connected to localhost. And if I kill the localhost node and run the same stuff again, it fails to connect.

ClientConfig conf = new XmlClientConfigBuilder("my-client-config.xml").build();
HazelcastInstance instance = HazelcastClient.newHazelcastClient(conf);

On Wednesday, 13 August 2014 14:57:09 UTC-5, Amit Ohale wrote: 
This sucks.. Hazelcast client doesn't complain if I am using server node xml and silently connects to localhost if I have a server node running on the same machine. 


On Wednesday, 13 August 2014 11:22:04 UTC-5, Amit Ohale wrote:

Jaromir Hamala

unread,
Aug 13, 2014, 5:37:48 PM8/13/14
to haze...@googlegroups.com
Hi Amit,

you are right. A client should not just ignore the fact the XML is for server. It should fail-fast and throw an exception. May I kindly ask you to create an issue on GitHub? 

Thank you very much,
Jara

Amit Ohale

unread,
Aug 13, 2014, 6:39:43 PM8/13/14
to haze...@googlegroups.com


On Wednesday, 13 August 2014 11:22:04 UTC-5, Amit Ohale wrote:
Reply all
Reply to author
Forward
0 new messages