bitsofinfo / hazelcast-docker-swarm-discovery-spi

Docker Swarm based discovery strategy SPI for Hazelcast enabled applications
Apache License 2.0
39 stars 33 forks source link

Add support for network interface based member binding #24

Closed SachinB2 closed 5 years ago

SachinB2 commented 6 years ago

Docker swarm initializes service name as host name depends on health check being configured, during hazelcast binding docker might not have necessarily initialized service name as host name and hence hazelcat Member binding fails.

To safegaurd hazelcast initialization during application startup bind hazelcast based on network interface name, Following is sample code snippet used for testing:

MemberAddressProviderConfig memberAddressProviderConfig = new MemberAddressProviderConfig(); memberAddressProviderConfig.setEnabled(true); memberAddressProviderConfig .setImplementation(new DockerNetworkInterfaceBasedMemberAddressProvider( memberAddressProviderProperties));

bitsofinfo commented 6 years ago

Please add documentation for how to use this option in the README, thank you!

bitsofinfo commented 5 years ago

@SachinB2 can you do the requested changes? is this PR still needed?

bitsofinfo commented 5 years ago

no response from PR submitter