Spring 为什么SimpleJMListenerContainerFactory不提供并发配置?

Spring 为什么SimpleJMListenerContainerFactory不提供并发配置?,spring,spring-jms,Spring,Spring Jms,我们可以看到SimpleMessageListenerContainer具有名为concurrentConsumers的属性,但SimpleJMListenerContainerFactory不支持对其进行配置。根本原因是什么?不建议对SimpleMessageListenerContainer?在@JmsListener注释上设置并发: /** * The concurrency limits for the listener, if any. Overrides the value def

我们可以看到
SimpleMessageListenerContainer
具有名为
concurrentConsumers
的属性,但
SimpleJMListenerContainerFactory
不支持对其进行配置。根本原因是什么?不建议对
SimpleMessageListenerContainer

@JmsListener
注释上设置并发:

/**
 * The concurrency limits for the listener, if any. Overrides the value defined
 * by the container factory used to create the listener container.
 * <p>The concurrency limits can be a "lower-upper" String &mdash; for example,
 * "5-10" &mdash; or a simple upper limit String &mdash; for example, "10", in
 * which case the lower limit will be 1.
 * <p>Note that the underlying container may or may not support all features.
 * For instance, it may not be able to scale, in which case only the upper limit
 * is used.
 */
String concurrency() default "";

Thx@Gary Russell!我忘了检查这个注释。
Overrides the value defined
 * by the container factory used to create the listener container.