Class AMQPFederationQueueConsumer
- java.lang.Object
-
- org.apache.activemq.artemis.protocol.amqp.connect.federation.AMQPFederationQueueConsumer
-
- All Implemented Interfaces:
FederationConsumer,FederationConsumerInternal
public class AMQPFederationQueueConsumer extends Object implements FederationConsumerInternal
Consumer implementation for Federated Queues that receives from a remote AMQP peer and forwards those messages onto the internal broker Queue for consumption by an attached resource.
-
-
Field Summary
Fields Modifier and Type Field Description static intDEFAULT_PENDING_MSG_CHECK_BACKOFF_MULTIPLIERstatic intDEFAULT_PENDING_MSG_CHECK_MAX_DELAY
-
Constructor Summary
Constructors Constructor Description AMQPFederationQueueConsumer(AMQPFederation federation, AMQPFederationConsumerConfiguration configuration, AMQPSessionContext session, FederationConsumerInfo consumerInfo, FederationReceiveFromQueuePolicy policy)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Close the federation consumer instance and cleans up its resources.FederationConsumerInfogetConsumerInfo()FederationgetFederation()FederationReceiveFromQueuePolicygetPolicy()protected booleanremoteLinkClosedIntercepter(org.apache.qpid.proton.engine.Link link)AMQPFederationQueueConsumersetRemoteClosedHandler(Consumer<FederationConsumerInternal> handler)Provides and event point for notification of the consumer having been closed by the remote.voidstart()Starts the consumer instance which includes creating the remote resources and performing any internal initialization needed to fully establish the consumer instance.
-
-
-
Field Detail
-
DEFAULT_PENDING_MSG_CHECK_BACKOFF_MULTIPLIER
public static final int DEFAULT_PENDING_MSG_CHECK_BACKOFF_MULTIPLIER
- See Also:
- Constant Field Values
-
DEFAULT_PENDING_MSG_CHECK_MAX_DELAY
public static final int DEFAULT_PENDING_MSG_CHECK_MAX_DELAY
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
AMQPFederationQueueConsumer
public AMQPFederationQueueConsumer(AMQPFederation federation, AMQPFederationConsumerConfiguration configuration, AMQPSessionContext session, FederationConsumerInfo consumerInfo, FederationReceiveFromQueuePolicy policy)
-
-
Method Detail
-
getFederation
public Federation getFederation()
- Specified by:
getFederationin interfaceFederationConsumer- Returns:
- the
Federationthat this consumer operates under.
-
getConsumerInfo
public FederationConsumerInfo getConsumerInfo()
- Specified by:
getConsumerInfoin interfaceFederationConsumer- Returns:
- an information object that defines the characteristics of the
FederationConsumer
-
getPolicy
public FederationReceiveFromQueuePolicy getPolicy()
- Returns:
- the
FederationReceiveFromQueuePolicythat initiated this consumer.
-
start
public void start()
Description copied from interface:FederationConsumerInternalStarts the consumer instance which includes creating the remote resources and performing any internal initialization needed to fully establish the consumer instance. This call should not block and any errors encountered on creation of the backing consumer resources should utilize the error handling mechanisms of thisFederationinstance.- Specified by:
startin interfaceFederationConsumerInternal
-
close
public void close()
Description copied from interface:FederationConsumerInternalClose the federation consumer instance and cleans up its resources. This method should not block and the actual resource shutdown work should occur asynchronously.- Specified by:
closein interfaceFederationConsumerInternal
-
setRemoteClosedHandler
public AMQPFederationQueueConsumer setRemoteClosedHandler(Consumer<FederationConsumerInternal> handler)
Description copied from interface:FederationConsumerInternalProvides and event point for notification of the consumer having been closed by the remote.- Specified by:
setRemoteClosedHandlerin interfaceFederationConsumerInternal- Parameters:
handler- The handler that will be invoked when the remote closes this consumer.- Returns:
- this consumer instance.
-
remoteLinkClosedIntercepter
protected boolean remoteLinkClosedIntercepter(org.apache.qpid.proton.engine.Link link)
-
-