diff --git a/org.springframework.jms/src/main/java/org/springframework/jms/listener/DefaultMessageListenerContainer.java b/org.springframework.jms/src/main/java/org/springframework/jms/listener/DefaultMessageListenerContainer.java index a2d8dfabfdb..2b21cd94274 100644 --- a/org.springframework.jms/src/main/java/org/springframework/jms/listener/DefaultMessageListenerContainer.java +++ b/org.springframework.jms/src/main/java/org/springframework/jms/listener/DefaultMessageListenerContainer.java @@ -297,9 +297,10 @@ public class DefaultMessageListenerContainer extends AbstractPollingMessageListe * to scale the consumption of messages coming in from a queue. However, * note that any ordering guarantees are lost once multiple consumers are * registered. In general, stick with 1 consumer for low-volume queues. - *
Do not raise the number of concurrent consumers for a topic. - * This would lead to concurrent consumption of the same message, - * which is hardly ever desirable. + *
Do not raise the number of concurrent consumers for a topic, + * unless vendor-specific setup measures clearly allow for it. + * With regular setup, this would lead to concurrent consumption + * of the same message, which is hardly ever desirable. *
This setting can be modified at runtime, for example through JMX. * @see #setMaxConcurrentConsumers */ @@ -336,9 +337,10 @@ public class DefaultMessageListenerContainer extends AbstractPollingMessageListe * to scale the consumption of messages coming in from a queue. However, * note that any ordering guarantees are lost once multiple consumers are * registered. In general, stick with 1 consumer for low-volume queues. - *
Do not raise the number of concurrent consumers for a topic. - * This would lead to concurrent consumption of the same message, - * which is hardly ever desirable. + *
Do not raise the number of concurrent consumers for a topic, + * unless vendor-specific setup measures clearly allow for it. + * With regular setup, this would lead to concurrent consumption + * of the same message, which is hardly ever desirable. *
This setting can be modified at runtime, for example through JMX. * @see #setConcurrentConsumers */ @@ -470,16 +472,6 @@ public class DefaultMessageListenerContainer extends AbstractPollingMessageListe } } - @Override - protected void validateConfiguration() { - super.validateConfiguration(); - synchronized (this.lifecycleMonitor) { - if (isSubscriptionDurable() && this.concurrentConsumers != 1) { - throw new IllegalArgumentException("Only 1 concurrent consumer supported for durable subscription"); - } - } - } - //------------------------------------------------------------------------- // Implementation of AbstractMessageListenerContainer's template methods