Interface SubscriptionRecoveryPolicy
-
- All Superinterfaces:
org.apache.activemq.Service
- All Known Implementing Classes:
FixedCountSubscriptionRecoveryPolicy
,FixedSizedSubscriptionRecoveryPolicy
,LastImageSubscriptionRecoveryPolicy
,NoSubscriptionRecoveryPolicy
,QueryBasedSubscriptionRecoveryPolicy
,RetainedMessageSubscriptionRecoveryPolicy
,TimedSubscriptionRecoveryPolicy
public interface SubscriptionRecoveryPolicy extends org.apache.activemq.Service
Abstraction to allow different recovery policies to be plugged into the region implementations. This is used by a topic to retroactively recover messages that the subscription missed.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
add(ConnectionContext context, org.apache.activemq.broker.region.MessageReference message)
A message was sent to the destination.org.apache.activemq.command.Message[]
browse(org.apache.activemq.command.ActiveMQDestination dest)
SubscriptionRecoveryPolicy
copy()
Used to copy the policy object.void
recover(ConnectionContext context, Topic topic, SubscriptionRecovery sub)
Let a subscription recover message held by the policy.void
setBroker(Broker broker)
-
-
-
Method Detail
-
add
boolean add(ConnectionContext context, org.apache.activemq.broker.region.MessageReference message) throws Exception
A message was sent to the destination.- Parameters:
context
-message
-- Returns:
- true if successful
- Throws:
Exception
-
recover
void recover(ConnectionContext context, Topic topic, SubscriptionRecovery sub) throws Exception
Let a subscription recover message held by the policy.- Parameters:
context
-topic
-sub
-- Throws:
Exception
-
browse
org.apache.activemq.command.Message[] browse(org.apache.activemq.command.ActiveMQDestination dest) throws Exception
- Parameters:
dest
-- Returns:
- messages
- Throws:
Exception
-
copy
SubscriptionRecoveryPolicy copy()
Used to copy the policy object.- Returns:
- the copy
-
-