I am evaluating Hazelcast IMDG with a view to use it to reduce some database bottle necks. Our application runs on a number of nodes processing data in parallel from a database sitting in the middle.
We use a semaphore table to distribute the work and this is what we are considering to replace with a Hazelcast blocking queue.
However some messages to process has a higher priority than others and this where I started having doubts as it seems that Hazelcast does not have an equivalent of java.util.concurrent.PriorityBlockingQueue
.
My first question is whether there is a way to achieve this with Hazelcast. My second question is whether there are other IMDG data grids easy to configure and embed into an existing application that would allow this.
Thank you in advance for your inputs.
Does this https://github.com/hazelcast/hazelcast-code-samples/tree/master/spi/priority-queue do what you need ?
It's a fully working example -- shows how Hazelcast can be extended to add the priority queue. Needs a little tweaking to make it production quality though, and some unit tests wouldn't go amiss.