Mixing Slow and Fast Consumers on a topic.
pchandler Sep 15, 2010 7:28 PMMy scenario in ActiveMQ 5.3:
I have a fast producer/publisher to topic A.
I have both Fast and Slow Consumers/Subscribers on topic A .
The behavior I am seeing is that the Producer slows down to match the speed of the slowest Consumer.
The desired behavior (what I need help configuring) is: the Producer does not slow down and the slower Consumer(s) just drop older messages. Question: How do I configure this behavior in ActiveMQ?
Below is what I have tried so far with no luck:
On the Broker: persistent="false"
Sender: jms.useAsyncSend="true"
destinationPolicy:
<policyEntry topic=">" producerFlowControl="false" memoryLimit="64mb"> <deadLetterStrategy> <individualDeadLetterStrategy topicPrefix="deadLetter"></individualDeadLetterStrategy> </deadLetterStrategy> <!-- How to dispatch the messages --> <dispatchPolicy> <strictOrderDispatchPolicy></strictOrderDispatchPolicy> </dispatchPolicy> <!-- which messages to get rid of --> <messageEvictionStrategy> <oldestMessageEvictionStrategy></oldestMessageEvictionStrategy> </messageEvictionStrategy> <!-- Keep around 2.5 times the prefetch count for each consumer --> <pendingMessageLimitStrategy> <prefetchRatePendingMessageLimitStrategy multiplier="2.5"></prefetchRatePendingMessageLimitStrategy> </pendingMessageLimitStrategy> <pendingSubscriberPolicy> <fileCursor></fileCursor> </pendingSubscriberPolicy> <!-- Keep the last 1000 messages --> <subscriptionRecoveryPolicy> <fixedCountSubscriptionRecoveryPolicy maximumSize="1000"></fixedCountSubscriptionRecoveryPolicy> </subscriptionRecoveryPolicy> </policyEntry>