문제

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