org.apache.activemq.broker.region.policy
Interface PendingMessageLimitStrategy
- All Known Implementing Classes:
- ConstantPendingMessageLimitStrategy, PrefetchRatePendingMessageLimitStrategy
public interface PendingMessageLimitStrategy
A pluggable strategy to calculate the maximum number of messages that are allowed to be pending on
consumers (in addition to their prefetch sizes).
Once the limit is reached, non-durable topics can then start discarding old messages.
This allows us to keep dispatching messages to slow consumers while not blocking fast consumers
and discarding the messages oldest first.
- Version:
- $Revision: 426366 $
getMaximumPendingMessageLimit
int getMaximumPendingMessageLimit(TopicSubscription subscription)
- Calculate the maximum number of pending messages (in excess of the prefetch size)
for the given subscription
- Returns:
- the maximum or -1 if there is no maximum
Copyright © 2011 Apache Software Foundation. All Rights Reserved.