Вопрос

I am trying to implement hazelcast. I was wondering if I use java.util.concurrent.BlockingQueue, it sets a max size automatically to it.

Let's say I start a cluster with one node in it, and implement BlockingQueue in it,
next I add one more node to the cluster, so will the queue's maximum size increase as now the cluster has a shared memory of two nodes?

I hope I made my point clear here.

Это было полезно?

Решение

You made your point clear.

The Hazelcast IQueue implementation is not a partitioned datastructure. So it will be stored completely on a single member (and the backup on another member).

So adding more members to the cluster will not increase the capacity of your queue.

One solution is to create a stripe of queues, so that the whole queue isn't stored on a single member. But it depends if you can deal with a stripe.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top