Class CompositeDestinationBroker

java.lang.Object
org.apache.activemq.broker.BrokerFilter
org.apache.activemq.broker.CompositeDestinationBroker
All Implemented Interfaces:
Broker, Region, org.apache.activemq.Service

public class CompositeDestinationBroker extends BrokerFilter
This broker filter handles composite destinations. If a broker operation is invoked using a composite destination, this filter repeats the operation using each destination of the composite. HRC: I think this filter is dangerous to use to with the consumer operations. Multiple Subscription objects will be associated with a single JMS consumer each having a different idea of what the current pre-fetch dispatch size is. If this is used, then the client has to expect many more messages to be dispatched than the pre-fetch setting allows.
  • Constructor Details

    • CompositeDestinationBroker

      public CompositeDestinationBroker(Broker next)
  • Method Details

    • addProducer

      public void addProducer(ConnectionContext context, org.apache.activemq.command.ProducerInfo info) throws Exception
      A producer may register to send to multiple destinations via a composite destination.
      Specified by:
      addProducer in interface Broker
      Specified by:
      addProducer in interface Region
      Overrides:
      addProducer in class BrokerFilter
      Parameters:
      context - the environment the operation is being executed under.
      Throws:
      Exception - TODO
    • removeProducer

      public void removeProducer(ConnectionContext context, org.apache.activemq.command.ProducerInfo info) throws Exception
      A producer may de-register from sending to multiple destinations via a composite destination.
      Specified by:
      removeProducer in interface Broker
      Specified by:
      removeProducer in interface Region
      Overrides:
      removeProducer in class BrokerFilter
      Parameters:
      context - the environment the operation is being executed under.
      Throws:
      Exception - TODO
    • send

      public void send(ProducerBrokerExchange producerExchange, org.apache.activemq.command.Message message) throws Exception
      Description copied from interface: Region
      Send a message to the broker to using the specified destination. The destination specified in the message does not need to match the destination the message is sent to. This is handy in case the message is being sent to a dead letter destination.
      Specified by:
      send in interface Region
      Overrides:
      send in class BrokerFilter
      Parameters:
      producerExchange - the environment the operation is being executed under.
      Throws:
      Exception - TODO