How do you programmatically configure hazelcast for the multicast discovery mechanism?

后端 未结 7 1212
-上瘾入骨i
-上瘾入骨i 2020-12-05 13:37

How do you programmatically configure hazelcast for the multicast discovery mechanism?


Details:

The documentation only supplies an example for TCP/IP

7条回答
  •  再見小時候
    2020-12-05 14:39

    So it appears that Multicast is working on your network; which is good.

    Could you try it with the following settings:

    Config cfg = new Config();                  
    NetworkConfig network = cfg.getNetworkConfig();
    
    JoinConfig join = network.getJoin();
    join.getTcpIpConfig().setEnabled(false);
    join.getAwsConfig().setEnabled(false);
    join.getMulticastConfig().setEnabled(true);
    
    HazelcastInstance instance = Hazelcast.newHazelcastInstance(cfg);
    

    As you can see, I removed all the customization.

提交回复
热议问题