froi
froi

Reputation: 7778

Does active mq prefetch work reserve away messages from other consumers?

Does the prefetch config locks away the messages so that other consumers will not be able to consume them?

Do they reflect immediately for example, if I have 1000 messages, and I have a prefetch value of 1000 on my consumers, will one consumer "reserve" all those messages to its self?

Upvotes: 0

Views: 40

Answers (1)

Tim Bish
Tim Bish

Reputation: 18376

The messages in a client's prefetch buffer are not dispatched to any other client until the client holding them closes and it has some outstanding messages.

If the client comes online and it is the sole consumer on the destination it will start prefetching right away, if there are other clients the destination and it is a Queue then the messages are round robin dispatched to the clients until their prefetch buffers are full. Multiple clients on a Queue act as load balancers.

Upvotes: 1

Related Questions