ActiveMQ 和预取限制
ActiveMQ and prefetch limit
我想了解 ApacheMQ 的预取限制是如何工作的。是否所有消息都在一次突发中发送?如果有并发消费者怎么办?
0 和 1 的预取限制有什么区别?
阅读 the link recommended by @Tim Bish -- 我提供的报价来自该页面。
So ActiveMQ uses a prefetch limit on how many messages can be streamed
to a consumer at any point in time. Once the prefetch limit is
reached, no more messages are dispatched to the consumer until the
consumer starts sending back acknowledgements of messages (to indicate
that the message has been processed). The actual prefetch limit value
can be specified on a per consumer basis.
特别是关于 0 与 1 预取限制的区别:
If you have very few messages and each message takes a very long time
to process you might want to set the prefetch value to 1 so that a
consumer is given one message at a time. Specifying a prefetch limit
of zero means the consumer will poll for more messages, one at a time,
instead of the message being pushed to the consumer.
我想了解 ApacheMQ 的预取限制是如何工作的。是否所有消息都在一次突发中发送?如果有并发消费者怎么办?
0 和 1 的预取限制有什么区别?
阅读 the link recommended by @Tim Bish -- 我提供的报价来自该页面。
So ActiveMQ uses a prefetch limit on how many messages can be streamed to a consumer at any point in time. Once the prefetch limit is reached, no more messages are dispatched to the consumer until the consumer starts sending back acknowledgements of messages (to indicate that the message has been processed). The actual prefetch limit value can be specified on a per consumer basis.
特别是关于 0 与 1 预取限制的区别:
If you have very few messages and each message takes a very long time to process you might want to set the prefetch value to 1 so that a consumer is given one message at a time. Specifying a prefetch limit of zero means the consumer will poll for more messages, one at a time, instead of the message being pushed to the consumer.