Class AMQPFederationEventProcessor

All Implemented Interfaces:
ProtonDeliveryHandler

public class AMQPFederationEventProcessor extends ProtonAbstractReceiver
A specialized AMQP Receiver that handles events from a remote Federation connection such as addition of addresses or queues where federation was requested but they did not exist at the time and the federation consumer was rejected.
  • Constructor Details

    • AMQPFederationEventProcessor

      public AMQPFederationEventProcessor(AMQPFederation federation, AMQPSessionContext session, org.apache.qpid.proton.engine.Receiver receiver)
      Create the new federation event receiver
      Parameters:
      federation - The AMQP Federation instance that this event consumer resides in.
      session - The associated session for this federation event consumer.
      receiver - The proton Receiver that this event consumer reads from.
  • Method Details

    • initialize

      public void initialize() throws Exception
      Specified by:
      initialize in class ProtonInitializable
      Throws:
      Exception
    • actualDelivery

      protected void actualDelivery(Message message, org.apache.qpid.proton.engine.Delivery delivery, org.apache.qpid.proton.amqp.messaging.DeliveryAnnotations deliveryAnnotations, org.apache.qpid.proton.engine.Receiver receiver, org.apache.activemq.artemis.core.transaction.Transaction tx)
      Description copied from class: ProtonAbstractReceiver
      Perform the actual message processing for an inbound message. The subclass either consumes and settles the message in place or hands it off to another intermediary who is responsible for eventually settling the newly read message.
      Specified by:
      actualDelivery in class ProtonAbstractReceiver
      Parameters:
      message - The message as provided from the remote or after local transformation by subclass.
      delivery - The proton delivery where the message bytes where read from
      deliveryAnnotations - The delivery annotations if present that accompanied the incoming message.
      receiver - The proton receiver that represents the link over which the message was sent.
      tx - The transaction under which the incoming message was sent.
    • createCreditRunnable

      protected Runnable createCreditRunnable(AMQPConnectionContext connection)
      Description copied from class: ProtonAbstractReceiver
      Subclass can override this to provide a custom credit runnable that performs other checks or applies credit in a manner more fitting that implementation.
      Overrides:
      createCreditRunnable in class ProtonAbstractReceiver
      Parameters:
      connection - The AMQPConnectionContext that this resource falls under.
      Returns:
      a Runnable that will perform the actual credit granting operation
    • doCreditTopUpRun

      protected void doCreditTopUpRun()
      Description copied from class: ProtonAbstractReceiver
      Performs the actual credit top up logic for the receiver.

      This can be overridden in the subclass to run its own logic for credit top up instead of using the default logic used in this abstract base.

      Overrides:
      doCreditTopUpRun in class ProtonAbstractReceiver
    • getAddressInUse

      protected SimpleString getAddressInUse()
      Description copied from class: ProtonAbstractReceiver
      Returns either the fixed address assigned to this sender, or the last address used by an anonymous relay sender; if this is an anonymous relay and no send has occurred then this method returns null.
      Specified by:
      getAddressInUse in class ProtonAbstractReceiver
      Returns:
      either the fixed address assigned to this sender, or the last address used by an anonymous relay sender; if this is an anonymous relay and no send has occurred then this method returns null