Interface ActiveMQServerAMQPFederationPlugin
- All Superinterfaces:
ActiveMQServerBasePlugin, AMQPFederationBrokerPlugin
Broker plugin which allows users to intercept federation related events when AMQP federation is configured on the
broker.
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidAfter a consumer for a federated resource is closeddefault voidAfter a consumer for a federated resource is createddefault voidafterFederationConsumerMessageHandled(FederationConsumer consumer, Message message) After a federation consumer handles a messagedefault voidBefore a consumer for a federated resource is closeddefault voidbeforeCreateFederationConsumer(FederationConsumerInfo consumerInfo) Before a consumer for a federated resource is createddefault voidbeforeFederationConsumerMessageHandled(FederationConsumer consumer, Message message) Before a federation consumer handles a messagedefault voidfederationStarted(Federation federation) After a federation instance has been starteddefault voidfederationStopped(Federation federation) After a federation instance has been stoppeddefault booleanshouldCreateFederationConsumerForAddress(org.apache.activemq.artemis.core.server.impl.AddressInfo address) Conditionally create a federation consumer for an address that matches the configuration of this server federation.default booleanshouldCreateFederationConsumerForDivert(org.apache.activemq.artemis.core.server.Divert divert, org.apache.activemq.artemis.core.server.Queue queue) Conditionally create a federation consumer for an divert binding that matches the configuration of this server federation.default booleanshouldCreateFederationConsumerForQueue(org.apache.activemq.artemis.core.server.Queue queue) Conditionally create a federation consumer for an address that matches the configuration of this server federation.Methods inherited from interface ActiveMQServerBasePlugin
init, registered, setInit, unregistered
-
Method Details
-
federationStarted
After a federation instance has been started- Parameters:
federation- TheFederationinstance that is being started.- Throws:
ActiveMQException- if an error occurs during the call.
-
federationStopped
After a federation instance has been stopped- Parameters:
federation- TheFederationinstance that is being stopped.- Throws:
ActiveMQException- if an error occurs during the call.
-
beforeCreateFederationConsumer
default void beforeCreateFederationConsumer(FederationConsumerInfo consumerInfo) throws ActiveMQException Before a consumer for a federated resource is created- Parameters:
consumerInfo- The information that will be used when creating the federation consumer.- Throws:
ActiveMQException- if an error occurs during the call.
-
afterCreateFederationConsumer
After a consumer for a federated resource is created- Parameters:
consumer- The consumer that was created after a matching federated resource is detected.- Throws:
ActiveMQException- if an error occurs during the call.
-
beforeCloseFederationConsumer
Before a consumer for a federated resource is closed- Parameters:
consumer- The federation consumer that is going to be closed.- Throws:
ActiveMQException- if an error occurs during the call.
-
afterCloseFederationConsumer
After a consumer for a federated resource is closed- Parameters:
consumer- The federation consumer that has been closed.- Throws:
ActiveMQException- if an error occurs during the call.
-
beforeFederationConsumerMessageHandled
default void beforeFederationConsumerMessageHandled(FederationConsumer consumer, Message message) throws ActiveMQException Before a federation consumer handles a message- Parameters:
consumer- TheFederationconsumer that is handling a new incoming message.message- TheMessagethat is being handled- Throws:
ActiveMQException- if an error occurs during the call.
-
afterFederationConsumerMessageHandled
default void afterFederationConsumerMessageHandled(FederationConsumer consumer, Message message) throws ActiveMQException After a federation consumer handles a message- Parameters:
consumer- TheFederationconsumer that is handling a new incoming message.message- TheMessagethat is being handled- Throws:
ActiveMQException- if an error occurs during the call.
-
shouldCreateFederationConsumerForAddress
default boolean shouldCreateFederationConsumerForAddress(org.apache.activemq.artemis.core.server.impl.AddressInfo address) throws ActiveMQException Conditionally create a federation consumer for an address that matches the configuration of this server federation. This allows custom logic to be inserted to decide when to create federation consumers- Parameters:
address- The address that matched the federation configuration- Returns:
- if
true, create the consumer, else if false don't create - Throws:
ActiveMQException- if an error occurs during the call.
-
shouldCreateFederationConsumerForQueue
default boolean shouldCreateFederationConsumerForQueue(org.apache.activemq.artemis.core.server.Queue queue) throws ActiveMQException Conditionally create a federation consumer for an address that matches the configuration of this server federation. This allows custom logic to be inserted to decide when to create federation consumers- Parameters:
queue- The queue that matched the federation configuration- Returns:
- if
true, create the consumer, else if false don't create - Throws:
ActiveMQException- if an error occurs during the call.
-
shouldCreateFederationConsumerForDivert
default boolean shouldCreateFederationConsumerForDivert(org.apache.activemq.artemis.core.server.Divert divert, org.apache.activemq.artemis.core.server.Queue queue) throws ActiveMQException Conditionally create a federation consumer for an divert binding that matches the configuration of this server federation. This allows custom logic to be inserted to decide when to create federation consumers- Parameters:
divert- TheDivertthat matched the federation configurationqueue- TheQueuethat was attached for a divert forwarding address.- Returns:
- if
true, create the consumer, else if false don't create - Throws:
ActiveMQException- if an error occurs during the call.
-