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.
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 © 2005-2011. All Rights Reserved.