Class ActiveMQMessageHandler
java.lang.Object
org.apache.activemq.artemis.ra.inflow.ActiveMQMessageHandler
- All Implemented Interfaces:
FailoverEventListener,MessageHandler
-
Constructor Summary
ConstructorsConstructorDescriptionActiveMQMessageHandler(ConnectionFactoryOptions options, ActiveMQActivation activation, TransactionSynchronizationRegistry tsr, ClientSessionInternal session, ClientSessionFactory cf, int sessionNr) -
Method Summary
Modifier and TypeMethodDescriptionvoidfailoverEvent(FailoverEventType eventType) Notifies that a connection state has changed according the specified event type.interruptConsumer(FutureLatch future) voidonMessage(ClientMessage message) Notifies the MessageHandler that a message has been received.voidonMessageExpired(ClientMessage message) Notifies the MessageHandler that an expired message has been received.voidsetup()voidstart()voidteardown()Stop the handler
-
Constructor Details
-
ActiveMQMessageHandler
public ActiveMQMessageHandler(ConnectionFactoryOptions options, ActiveMQActivation activation, TransactionSynchronizationRegistry tsr, ClientSessionInternal session, ClientSessionFactory cf, int sessionNr)
-
-
Method Details
-
setup
- Throws:
Exception
-
getCurrentThread
-
interruptConsumer
-
teardown
public void teardown()Stop the handler -
onMessage
Description copied from interface:MessageHandlerNotifies the MessageHandler that a message has been received.- Specified by:
onMessagein interfaceMessageHandler- Parameters:
message- a message
-
onMessageExpired
Description copied from interface:MessageHandlerNotifies the MessageHandler that an expired message has been received.- Specified by:
onMessageExpiredin interfaceMessageHandler- Parameters:
message- a message
-
start
- Throws:
ActiveMQException
-
failoverEvent
Description copied from interface:FailoverEventListenerNotifies that a connection state has changed according the specified event type.This method is called when failover is detected, if it fails and when it's completed
- Specified by:
failoverEventin interfaceFailoverEventListener- Parameters:
eventType- The type of event
-