Closed philnate closed 7 years ago
OK. I think you have a point and we should make that local instances selection in the HazelcastLocalInstanceRegistrar
as optional if an explicit instance is injected.
Right the HazelcastLocalInstanceRegistrar
bean must be registered in that case.
So, I even guess that we should make an id
for that bean much easier.
Sorry, for such an inconvenience.
Hi,
I tried to use the LeaderElection functionality for Hazelcast and stumpled upon the fact that
org.springframework.integration.hazelcast.HazelcastLocalInstanceRegistrar
is checkingcom.hazelcast.core.Hazelcast
for all HazelcastInstances on that JVM. The thing is that this doesn't include HazelcastClients, but in our Scenario we have dedicated Hazelcast server to which we connect with HazelcastClients.I lack the deeper knowledge of the spring-integration Project, as I'm just after the LeaderElection, but wouldn't it be sufficient to just have a HazelcastInstance autowired, which is then used to register the Listener on to?
For the moment I worked around the issue by tricking Spring into thinking that this Registrar is already present by adding a Dummy bean, which seems to do no harm for the LeaderElection scenario but likely for the other things.