Hi!
Could anyone suggest libraries compatible with Java Spring for this use-case?
Basically, I want a distributed systems library which provides a data structure whose elements can be evenly split across processes, and provides listeners which trigger when ownership changes
I've been having some issues with Hazelcast here: https://stackoverflow.com/questions/76328326/how-to-listen-for-repartition-and-restoring-from-backup-events-on-my-hazelcast-d
and I'm wondering if there's another alternative library I could use instead.
- My application needs to subscribe to a large number of "topics" via a pub-sub message service.
- When multiple instances of my application are running, I want them to split the "topics" evenly among them, and subscribe/unsubscribe from the topics such that all topics are subscribed to by exactly 1 instance at a given time.
E.g:
- Instance 1 starts, subscribes to all the keys
- Instance 2 starts and subscribes to half of the keys, instance 1 unsubscribes from these same keys.
- Instance 1 goes down. Instance 2 subscribes to all the keys which instance 1 had.