Spring中JMS主题侦听器中的并发值

Spring中JMS主题侦听器中的并发值,spring,jms,spring-jms,Spring,Jms,Spring Jms,我知道Spring,但我是JMS的新手,并开始阅读SpringJMS。从SpringJMS文档中,我阅读了以下内容 The number of concurrent sessions/consumers to start for each listener. Can either be a simple number indicating the maximum number (e.g. "5") or a range indicating the lower as well as the u

我知道Spring,但我是JMS的新手,并开始阅读SpringJMS。从SpringJMS文档中,我阅读了以下内容

The number of concurrent sessions/consumers to start for each listener.
Can either be a simple number indicating the maximum number (e.g. "5") 
or a range indicating the lower as well as the upper limit (e.g. "3-5").  
Note that a specified minimum is just a hint and might be ignored at 
runtime. Default is 1; keep concurrency limited to 1 in case of a topic 
listener or if queue ordering is important; consider raising it for 
general queues.

只是想了解一下,对于主题侦听器,为什么并发性应该限制为1?如果我将其增加到10而不是1,会发生什么情况?

每个订阅者都会收到发布到
主题的每条消息的副本。设置多个使用者毫无意义,因为您的应用程序只需在不同的线程中接收相同的消息10次

对于
队列
,队列上的消息将分布在10个线程中,因此将并发处理。这确实是一个非常常见的场景——负载平衡