DefaultMessageListenerContainer allows for concurrent subscription consumers on WebLogic/ActiveMQ

Issue: SPR-10037
This commit is contained in:
Juergen Hoeller
2012-11-29 23:08:46 +01:00
parent 959ab7a5db
commit 4058f693e5

View File

@@ -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.
* <p><b>Do not raise the number of concurrent consumers for a topic.</b>
* This would lead to concurrent consumption of the same message,
* which is hardly ever desirable.
* <p><b>Do not raise the number of concurrent consumers for a topic,
* unless vendor-specific setup measures clearly allow for it.</b>
* With regular setup, this would lead to concurrent consumption
* of the same message, which is hardly ever desirable.
* <p><b>This setting can be modified at runtime, for example through JMX.</b>
* @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.
* <p><b>Do not raise the number of concurrent consumers for a topic.</b>
* This would lead to concurrent consumption of the same message,
* which is hardly ever desirable.
* <p><b>Do not raise the number of concurrent consumers for a topic,
* unless vendor-specific setup measures clearly allow for it.</b>
* With regular setup, this would lead to concurrent consumption
* of the same message, which is hardly ever desirable.
* <p><b>This setting can be modified at runtime, for example through JMX.</b>
* @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