Skip to content

Commit 4058f69

Browse files
committed
DefaultMessageListenerContainer allows for concurrent subscription consumers on WebLogic/ActiveMQ
Issue: SPR-10037
1 parent 959ab7a commit 4058f69

File tree

1 file changed

+8
-16
lines changed

1 file changed

+8
-16
lines changed

org.springframework.jms/src/main/java/org/springframework/jms/listener/DefaultMessageListenerContainer.java

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -297,9 +297,10 @@ public void setConcurrency(String concurrency) {
297297
* to scale the consumption of messages coming in from a queue. However,
298298
* note that any ordering guarantees are lost once multiple consumers are
299299
* registered. In general, stick with 1 consumer for low-volume queues.
300-
* <p><b>Do not raise the number of concurrent consumers for a topic.</b>
301-
* This would lead to concurrent consumption of the same message,
302-
* which is hardly ever desirable.
300+
* <p><b>Do not raise the number of concurrent consumers for a topic,
301+
* unless vendor-specific setup measures clearly allow for it.</b>
302+
* With regular setup, this would lead to concurrent consumption
303+
* of the same message, which is hardly ever desirable.
303304
* <p><b>This setting can be modified at runtime, for example through JMX.</b>
304305
* @see #setMaxConcurrentConsumers
305306
*/
@@ -336,9 +337,10 @@ public final int getConcurrentConsumers() {
336337
* to scale the consumption of messages coming in from a queue. However,
337338
* note that any ordering guarantees are lost once multiple consumers are
338339
* registered. In general, stick with 1 consumer for low-volume queues.
339-
* <p><b>Do not raise the number of concurrent consumers for a topic.</b>
340-
* This would lead to concurrent consumption of the same message,
341-
* which is hardly ever desirable.
340+
* <p><b>Do not raise the number of concurrent consumers for a topic,
341+
* unless vendor-specific setup measures clearly allow for it.</b>
342+
* With regular setup, this would lead to concurrent consumption
343+
* of the same message, which is hardly ever desirable.
342344
* <p><b>This setting can be modified at runtime, for example through JMX.</b>
343345
* @see #setConcurrentConsumers
344346
*/
@@ -470,16 +472,6 @@ public final int getIdleTaskExecutionLimit() {
470472
}
471473
}
472474

473-
@Override
474-
protected void validateConfiguration() {
475-
super.validateConfiguration();
476-
synchronized (this.lifecycleMonitor) {
477-
if (isSubscriptionDurable() && this.concurrentConsumers != 1) {
478-
throw new IllegalArgumentException("Only 1 concurrent consumer supported for durable subscription");
479-
}
480-
}
481-
}
482-
483475

484476
//-------------------------------------------------------------------------
485477
// Implementation of AbstractMessageListenerContainer's template methods

0 commit comments

Comments
 (0)