Exclusive Consumer

从 1.3 版开始,你可以使用单个独占使用者来配置侦听器容器。这样可以防止其他容器在当前使用者被取消之前从队列消费。此类容器的并发性必须为 1

Starting with version 1.3, you can configure the listener container with a single exclusive consumer. This prevents other containers from consuming from the queues until the current consumer is cancelled. The concurrency of such a container must be 1.

使用独占使用者时,其他容器会根据 recoveryInterval 属性尝试从队列消费,如果尝试失败,则会记录一条 WARN 消息。

When using exclusive consumers, other containers try to consume from the queues according to the recoveryInterval property and log a WARN message if the attempt fails.