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

    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)
     
    Used to copy the policy object.
    void
    Let a subscription recover message held by the policy.
    void
    setBroker(Broker broker)
     

    Methods inherited from interface org.apache.activemq.Service

    start, stop
  • Method Details

    • 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

      Used to copy the policy object.
      Returns:
      the copy
    • setBroker

      void setBroker(Broker broker)