Spring Message Listener Container 文档说:
The durable subscription name needs to be unique within this client's JMS client id. Default is the class name of the specified message listener. Note: Only 1 concurrent consumer (which is the default of this message listener container) is allowed for each durable subscription.
我想,我们可以同时处理并发消息。我错过了什么吗?
最佳答案
是的,文档是正确的。在任何时候都只能有一个消费者接收持久订阅的消息。所有持久订阅都由一个唯一的 id 标识。如果一个消费者已经在使用某个 ID 接收消息,则另一次尝试为该持久订阅创建具有相同 ID 的消费者将失败。
关于spring - 持久订阅消费者不能同时消费超过 1 条消息吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9997044/