Class AMQPFederationAddressBindingsConsumer

All Implemented Interfaces:
FederationConsumer

public final class AMQPFederationAddressBindingsConsumer extends AMQPFederationAddressConsumer
Consumer implementation for Federated Addresses that receives from a remote AMQP peer and forwards those messages onto the internal bindings on a given address that matched criteria of the given FederationConsumerInfo. The consumer is subscribed to the remote address likely using a filter that matches the filter of one or more local bindings on an address which defines the local demand. Once a message is sent from the remote this consumer routes that message to each of the local consumers that triggered the federation link.

The goal of this federation consumer implementation is to allow consumption of a more limited set of messages from a remote address by applying filters for local address consumers and routing the resulting messages directly to them. The possible down side here is that if the filters being used aren't fine grained enough that consumers with differing filters might still have overlaps in the messages they receive which would then produce more message traffic across the federation than would be generated if using the standard conduit consumer pattern (this can also happen if filtered and non-filtered consumers are mixed on the local address).

  • Constructor Details

  • Method Details

    • createDeliveryHandler

      protected AMQPFederationAddressConsumer.AMQPFederatedAddressDeliveryHandler createDeliveryHandler(org.apache.qpid.proton.engine.Receiver receiver)
      Description copied from class: AMQPFederationAddressConsumer
      Create the delivery handler instance that will assigned as the context on the AMQP receiver link instance.
      Specified by:
      createDeliveryHandler in class AMQPFederationAddressConsumer
      Parameters:
      receiver - The Receiver instance that the returned delivery handler is bound to.
      Returns:
      a new delivery handler that will route incoming messages to their intended target.
    • addBindings

      public void addBindings(Collection<org.apache.activemq.artemis.core.postoffice.Binding> currentBindings)
      Adds a collection of Binding instances that should have any received messages routed to them as they arrive from the remote.
      Parameters:
      currentBindings - The bindings that should receive any messages sent from the remote
    • addBinding

      public void addBinding(org.apache.activemq.artemis.core.postoffice.Binding binding)
      Adds a Binding to the set of bindings that should receive messages from the remote to the collection of tracked bindings.
      Parameters:
      binding - The Binding to add to the tracked collection.
    • removeBinding

      public void removeBinding(org.apache.activemq.artemis.core.postoffice.Binding binding)
      Removes a Binding from the set of bindings that should receive messages from the remote to the collection of tracked bindings.
      Parameters:
      binding - The Binding to remove from the tracked collection.