【发布时间】:2018-01-25 22:27:10
【问题描述】:
我为多个消费者阅读了activemq的文档:http://activemq.apache.org/multiple-consumers-on-a-queue.html
上面写着The JMS contract is that only 1 session is used by one thread at once - which if you're using consumers means that only 1 consumer can receive messages at once if using the same session.,所以当需要有多个消费者时,我们应该始终创建多个会话。
但是 JMS 的 api 确实有从单个会话创建多个消费者的方法,而且它似乎工作正常。
我想知道一个会话中多个消费者的一些特殊条件是否有价值?或者这只是一个无用的功能?
【问题讨论】: