Class AMQPFederationAddressConsumer.AMQPFederatedAddressDeliveryHandler

All Implemented Interfaces:
ProtonDeliveryHandler
Enclosing class:
AMQPFederationAddressConsumer

protected abstract class AMQPFederationAddressConsumer.AMQPFederatedAddressDeliveryHandler extends ProtonServerReceiverContext
Wrapper around the standard receiver context that provides federation specific entry points and customizes inbound delivery handling for this Address receiver.
  • Field Details

    • cachedAddress

      protected final SimpleString cachedAddress
    • closed

      protected boolean closed
  • Method Details

    • close

      public final void close(boolean remoteLinkClose) throws ActiveMQAMQPException
      Specified by:
      close in interface ProtonDeliveryHandler
      Overrides:
      close in class ProtonServerReceiverContext
      Throws:
      ActiveMQAMQPException
    • isUseModifiedForTransientDeliveryErrors

      protected boolean isUseModifiedForTransientDeliveryErrors(AMQPConnectionContext connection)
      Description copied from class: ProtonAbstractReceiver
      Should the receiver send an AMQP Modified disposition with delivery failed set to true for address full errors instead of the Rejected disposition it would by default.
      Overrides:
      isUseModifiedForTransientDeliveryErrors in class ProtonAbstractReceiver
      Parameters:
      connection - The connection context that this receiver instance is bound to
      Returns:
      true if the receiver send a modified outcome and false for rejected outcomes.
    • isDrainOnTransientDeliveryErrors

      protected boolean isDrainOnTransientDeliveryErrors(AMQPConnectionContext connection)
      Description copied from class: ProtonAbstractReceiver
      Should the receiver drain link credit when a transient delivery error occurs, this allows subclass implementations to override the defaults set on the connection level.
      Overrides:
      isDrainOnTransientDeliveryErrors in class ProtonAbstractReceiver
      Parameters:
      connection - The connection context that this receiver instance is bound to
      Returns:
      true if transient delivery errors should be handled by draining link credit from the remote sender.
    • getLinkQuiesceTimeout

      protected int getLinkQuiesceTimeout(AMQPConnectionContext connection)
      Description copied from class: ProtonAbstractReceiver
      Gets the time in milliseconds that the receiver should wait before it considers a link quiesce attempt to have failed and act to close the link with an error, this allows subclass implementations to override the defaults set on the connection level.
      Overrides:
      getLinkQuiesceTimeout in class ProtonAbstractReceiver
      Parameters:
      connection - The connection context that this receiver instance is bound to
      Returns:
      the time in milliseconds to wait for remote sender once a link quiesce is initiated by this peer.
    • createCreditRunnable

      protected final 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
    • getConfiguredMinLargeMessageSize

      protected final int getConfiguredMinLargeMessageSize(AMQPConnectionContext connection)
      Description copied from class: ProtonAbstractReceiver
      Subclass can override this to provide the minimum large message size that should be used when creating receiver instances.
      Overrides:
      getConfiguredMinLargeMessageSize in class ProtonAbstractReceiver
      Parameters:
      connection - The AMQPConnectionContext that this resource falls under.
      Returns:
      the minimum large message size configuration value for this receiver
    • initialize

      public final void initialize() throws Exception
      Overrides:
      initialize in class ProtonServerReceiverContext
      Throws:
      Exception
    • actualDelivery

      protected final 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.
      Overrides:
      actualDelivery in class ProtonServerReceiverContext
      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.
    • routeFederatedMessage

      protected abstract void routeFederatedMessage(Message message, org.apache.qpid.proton.engine.Delivery delivery, org.apache.qpid.proton.engine.Receiver receiver, org.apache.activemq.artemis.core.transaction.Transaction tx) throws Exception
      Route the inbound message to the intended target address bindings.
      Parameters:
      message - The received message after transform and hops count updates.
      delivery - The Delivery that the message arrived in
      receiver - The Receiver that represents the consumer link.
      tx - The active transaction this message arrived within.
      Throws:
      Exception - if an error occurs routing the message.