Class PrefetchRatePendingMessageLimitStrategy
- java.lang.Object
-
- org.apache.activemq.broker.region.policy.PrefetchRatePendingMessageLimitStrategy
-
- All Implemented Interfaces:
PendingMessageLimitStrategy
public class PrefetchRatePendingMessageLimitStrategy extends Object implements PendingMessageLimitStrategy
This PendingMessageLimitStrategy sets the maximum pending message limit value to be a multiplier of the prefetch limit of the subscription.
-
-
Constructor Summary
Constructors Constructor Description PrefetchRatePendingMessageLimitStrategy()
-
Method Summary
All Methods Instance Methods Concrete 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 subscriptiondouble
getMultiplier()
void
setMultiplier(double rate)
Sets the multiplier of the prefetch size which will be used to define the maximum number of pending messages for non-durable topics before messages are discarded.
-
-
-
Method Detail
-
getMaximumPendingMessageLimit
public int getMaximumPendingMessageLimit(TopicSubscription subscription)
Description copied from interface:PendingMessageLimitStrategy
Calculate the maximum number of pending messages (in excess of the prefetch size) for the given subscription- Specified by:
getMaximumPendingMessageLimit
in interfacePendingMessageLimitStrategy
- Returns:
- the maximum or -1 if there is no maximum
-
getMultiplier
public double getMultiplier()
-
setMultiplier
public void setMultiplier(double rate)
Sets the multiplier of the prefetch size which will be used to define the maximum number of pending messages for non-durable topics before messages are discarded.
-
-