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.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
getMaximumPendingMessageLimit(TopicSubscription subscription)
Calculate the maximum number of pending messages (in excess of the prefetch size) for the given subscription
-
-
-
Method Detail
-
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
-
-