Class AMQPFederationQueuePolicyManager

All Implemented Interfaces:
ActiveMQServerBasePlugin, ActiveMQServerBindingPlugin, ActiveMQServerConsumerPlugin

public final class AMQPFederationQueuePolicyManager extends AMQPFederationLocalPolicyManager implements ActiveMQServerConsumerPlugin, ActiveMQServerBindingPlugin
The AMQP Federation implementation of an federation queue policy manager.
  • Field Details

  • Constructor Details

  • Method Details

    • getPolicy

      Returns the receive from address policy that backs the address policy manager.
      Specified by:
      getPolicy in class AMQPFederationLocalPolicyManager
      Returns:
      the receive from address policy that backs the address policy manager
    • safeCleanupManagerResources

      protected void safeCleanupManagerResources(boolean force)
      Description copied from class: AMQPFederationLocalPolicyManager
      The subclass implements this method and should remove all tracked federation consumer data and also close all consumers either by first safely stopping the consumer or if offline simply closing the consumer. If the force flag is set to true the implementation should close the consumer without attempting to stop it by draining link credit before the close.
      Specified by:
      safeCleanupManagerResources in class AMQPFederationLocalPolicyManager
      Parameters:
      force - Should the implementation simply close the consumers without attempting a stop.
    • afterCreateConsumer

      public void afterCreateConsumer(org.apache.activemq.artemis.core.server.ServerConsumer consumer)
      Specified by:
      afterCreateConsumer in interface ActiveMQServerConsumerPlugin
    • afterCloseConsumer

      public void afterCloseConsumer(org.apache.activemq.artemis.core.server.ServerConsumer consumer, boolean failed)
      Specified by:
      afterCloseConsumer in interface ActiveMQServerConsumerPlugin
    • afterRemoveBinding

      public void afterRemoveBinding(org.apache.activemq.artemis.core.postoffice.Binding binding, org.apache.activemq.artemis.core.transaction.Transaction tx, boolean deleteData) throws ActiveMQException
      Specified by:
      afterRemoveBinding in interface ActiveMQServerBindingPlugin
      Throws:
      ActiveMQException
    • scanAllBindings

      protected void scanAllBindings()
      Description copied from class: AMQPFederationLocalPolicyManager
      Scans all bindings and push them through the normal bindings checks that would be done on an add. This allows for checks on demand after a start or after a connection is restored.
      Specified by:
      scanAllBindings in class AMQPFederationLocalPolicyManager
    • updateStateAfterConnect

      protected void updateStateAfterConnect(AMQPFederationConsumerConfiguration configuration, AMQPSessionContext session)
      Description copied from class: AMQPFederationLocalPolicyManager
      Allows the policy manager implementation to update internal state after (re)connection and before the policy manager triggers a scan of all bindings to check for existing or new demand.
      Specified by:
      updateStateAfterConnect in class AMQPFederationLocalPolicyManager
      Parameters:
      configuration - The updated configuration based on the current connection.
      session - The session that matches the current connection.
    • afterRemoteQueueAdded

      public void afterRemoteQueueAdded(String addressName, String queueName) throws Exception
      Checks if the remote queue added falls within the set of queues that match the configured queue policy and if so scans for local demand on that queue to see if a new attempt to federate the queue is needed.
      Parameters:
      addressName - The address that was added on the remote.
      queueName - The queue that was added on the remote.
      Throws:
      Exception - if an error occurs while processing the queue added event.