Interface SubscriptionRecoveryPolicy
-
- All Superinterfaces:
Service
- All Known Implementing Classes:
FixedCountSubscriptionRecoveryPolicy
,FixedSizedSubscriptionRecoveryPolicy
,LastImageSubscriptionRecoveryPolicy
,NoSubscriptionRecoveryPolicy
,QueryBasedSubscriptionRecoveryPolicy
,RetainedMessageSubscriptionRecoveryPolicy
,TimedSubscriptionRecoveryPolicy
public interface SubscriptionRecoveryPolicy extends 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, MessageReference message)
A message was sent to the destination.Message[]
browse(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, 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
Message[] browse(ActiveMQDestination dest) throws Exception
- Parameters:
dest
-- Returns:
- messages
- Throws:
Exception
-
copy
SubscriptionRecoveryPolicy copy()
Used to copy the policy object.- Returns:
- the copy
-
setBroker
void setBroker(Broker broker)
-
-