-
1. Re: How to be notified of clients coming and leaving the distributed data-grid?
rvansa Oct 7, 2015 3:43 AM (in response to cchene)If you want to know about JGroups members of the cluster, you have to go down to the JChannel the dirty way and register it there.
In Infinispan, you can register listeners for @DataRehashed and @TopologyChange in the same way as regular cache event listeners (cache.getAdvancedCache().addListener(...)). On DataRehashedEvent you can use getMembersAtStart() and getMembersAtEnd(), on TopologyChangeEvent you need to use getConsistentHashAtStart/End().getMembers().
-
2. Re: How to be notified of clients coming and leaving the distributed data-grid?
nadirx Oct 7, 2015 5:42 AM (in response to rvansa)We have ViewChanged
https://docs.jboss.org/infinispan/8.0/apidocs/org/infinispan/notifications/cachemanagerlistener/annotation/ViewChanged.html which is you can attach to a Cache Manager
-
3. Re: How to be notified of clients coming and leaving the distributed data-grid?
cchene Oct 7, 2015 11:22 AM (in response to cchene)Thanks!
Sorry I didn't see that...
My first test shows that I receive the ViewChangeEvent when a member comes in, not when it leaves.
But that may be because of the way I leave the cluster...
I'll have a look at it as soon as possible.
Thanks again