I am currently writing a distributed system using hazelcast. I have a few questions regarding Queues implemented using hazelcast.
- What is the best way to process data from a queue? Currently, I have threads in each "node" that reads the lock queue while processing data. Is this correct or is there some kind of class that I don't know about that takes care of this, like JMS or messageListener?
- I see that there is a time-to-live-second parameter that will remove the entry from the expired queue. My question is ... is there a way to detect the removal of an expired item from the queue? I know that there are Listeners, but this does not help, since it works on all the "nodes", and not just on one. I am looking for a way to execute code for each expired message (looks like a dead letter queue).
Any material or advice on this subject is welcome.
thanks
source share