项目需要设置多个消费者并发消费信息,网上yml的配置比较少研究了以下
concurrentConsumers属性设置了没有效果,于是采用concurrency设置固定的消费者,max-concurrency为最大消费者数量
spring:
activemq:
broker-url: tcp://localhost:61616
user: admin
password: admin
packages:
trust-all: true
jms:
Listener:
#默认开启多少个消费者
concurrency: 3
#设置消费者并行最大数量
max-concurrency: 5