Class AMQPFederationEventProcessor
java.lang.Object
org.apache.activemq.artemis.protocol.amqp.proton.ProtonInitializable
org.apache.activemq.artemis.protocol.amqp.proton.ProtonAbstractReceiver
org.apache.activemq.artemis.protocol.amqp.connect.federation.AMQPFederationEventProcessor
- All Implemented Interfaces:
ProtonDeliveryHandler
A specialized AMQP Receiver that handles events from a remote Federation connection such as addition of addresses or
queues where federation was requested but they did not exist at the time and the federation consumer was rejected.
-
Nested Class Summary
Nested classes/interfaces inherited from class ProtonAbstractReceiver
ProtonAbstractReceiver.FlowControlRunner, ProtonAbstractReceiver.ReceiverState -
Field Summary
Fields inherited from class ProtonAbstractReceiver
connection, coreLargeMessageReader, coreMessageReader, coreTunnelingEnabled, creditRunnable, creditTopUpRunner, drainCreditOnNoSpace, drainTimeout, largeMessageReader, messageReader, minLargeMessageSize, pendingQuiesceTimeout, pendingSettles, pendingStop, protonSession, receiver, routingContext, sessionSPI, standardMessageReader, state, useModifiedFields inherited from class ProtonInitializable
initialized -
Constructor Summary
ConstructorsConstructorDescriptionAMQPFederationEventProcessor(AMQPFederation federation, AMQPSessionContext session, org.apache.qpid.proton.engine.Receiver receiver) Create the new federation event receiver -
Method Summary
Modifier and TypeMethodDescriptionprotected voidactualDelivery(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) Perform the actual message processing for an inbound message.protected RunnablecreateCreditRunnable(AMQPConnectionContext connection) Subclass can override this to provide a custom credit runnable that performs other checks or applies credit in a manner more fitting that implementation.protected voidPerforms the actual credit top up logic for the receiver.protected SimpleStringReturns either the fixed address assigned to this sender, or the last address used by an anonymous relay sender; if this is an anonymous relay and no send has occurred then this method returnsnull.voidMethods inherited from class ProtonAbstractReceiver
calculatedUpdateRefill, close, close, closeCurrentReader, createCreditRunnable, deliveryFailed, enableCoreTunneling, failIfCoreTunnelNotEnabled, getConfiguredMinLargeMessageSize, getConnection, getEffectiveDefaultOutcome, getLinkQuiesceTimeout, getSessionContext, incrementSettle, isAddressFull, isBellowThreshold, isBusy, isClosed, isDraining, isDrainOnTransientDeliveryErrors, isStarted, isStopped, isStopping, isUseModifiedForTransientDeliveryErrors, onExceptionWhileReading, onFlow, onMessage, onMessageComplete, outcomeSupported, recoverContext, settle, start, stop, topUpCreditIfNeeded, trySelectMessageReaderMethods inherited from class ProtonInitializable
isInitialized
-
Constructor Details
-
AMQPFederationEventProcessor
public AMQPFederationEventProcessor(AMQPFederation federation, AMQPSessionContext session, org.apache.qpid.proton.engine.Receiver receiver) Create the new federation event receiver- Parameters:
federation- The AMQP Federation instance that this event consumer resides in.session- The associated session for this federation event consumer.receiver- The protonReceiverthat this event consumer reads from.
-
-
Method Details
-
initialize
- Specified by:
initializein classProtonInitializable- Throws:
Exception
-
actualDelivery
protected 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:ProtonAbstractReceiverPerform 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.- Specified by:
actualDeliveryin classProtonAbstractReceiver- 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 fromdeliveryAnnotations- 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.
-
createCreditRunnable
Description copied from class:ProtonAbstractReceiverSubclass can override this to provide a custom credit runnable that performs other checks or applies credit in a manner more fitting that implementation.- Overrides:
createCreditRunnablein classProtonAbstractReceiver- Parameters:
connection- TheAMQPConnectionContextthat this resource falls under.- Returns:
- a
Runnablethat will perform the actual credit granting operation
-
doCreditTopUpRun
protected void doCreditTopUpRun()Description copied from class:ProtonAbstractReceiverPerforms the actual credit top up logic for the receiver.This can be overridden in the subclass to run its own logic for credit top up instead of using the default logic used in this abstract base.
- Overrides:
doCreditTopUpRunin classProtonAbstractReceiver
-
getAddressInUse
Description copied from class:ProtonAbstractReceiverReturns either the fixed address assigned to this sender, or the last address used by an anonymous relay sender; if this is an anonymous relay and no send has occurred then this method returnsnull.- Specified by:
getAddressInUsein classProtonAbstractReceiver- Returns:
- either the fixed address assigned to this sender, or the last address used by an anonymous relay sender;
if this is an anonymous relay and no send has occurred then this method returns
null
-