Class LoggingActiveMQServerPlugin
java.lang.Object
org.apache.activemq.artemis.core.server.plugin.impl.LoggingActiveMQServerPlugin
- All Implemented Interfaces:
Serializable,ActiveMQServerAddressPlugin,ActiveMQServerBasePlugin,ActiveMQServerBindingPlugin,ActiveMQServerBridgePlugin,ActiveMQServerConnectionPlugin,ActiveMQServerConsumerPlugin,ActiveMQServerCriticalPlugin,ActiveMQServerFederationPlugin,ActiveMQServerMessagePlugin,ActiveMQServerPlugin,ActiveMQServerQueuePlugin,ActiveMQServerResourcePlugin,ActiveMQServerSessionPlugin
public class LoggingActiveMQServerPlugin
extends Object
implements ActiveMQServerPlugin, Serializable
plugin to log various events within the broker, configured with the following booleans:
LOG_CONNECTION_EVENTS- connections creation/destroyLOG_SESSION_EVENTS- sessions creation/closeLOG_CONSUMER_EVENTS- consumers creation/closeLOG_DELIVERING_EVENTS- messages delivered to consumer, acked by consumerLOG_SENDING_EVENTS- messaged is sent, message is routedLOG_INTERNAL_EVENTS- critical failures, bridge deployments, queue creation/destroyed, message expired
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidafterCloseConsumer(ServerConsumer consumer, boolean failed) After a consumer is closedvoidafterCloseSession(ServerSession session, boolean failed) After a session is closedvoidafterCreateConnection(RemotingConnection connection) A connection has been created.voidafterCreateConsumer(ServerConsumer consumer) After a consumer has been createdvoidafterCreateQueue(Queue queue) After a queue has been createdvoidafterCreateSession(ServerSession session) After a session has been created.voidafterDeliver(ServerConsumer consumer, MessageReference reference) After a message is delivered to a client consumervoidafterDeployBridge(Bridge bridge) After a bridge has been deployedvoidafterDestroyConnection(RemotingConnection connection) A connection has been destroyed.voidafterDestroyQueue(Queue queue, SimpleString address, SecurityAuth session, boolean checkConsumerCount, boolean removeConsumers, boolean autoDeleteAddress) After a queue has been destroyedvoidafterMessageRoute(Message message, RoutingContext context, boolean direct, boolean rejectDuplicates, RoutingStatus result) After a message is routedvoidafterSend(ServerSession session, Transaction tx, Message message, boolean direct, boolean noAutoCreateQueue, RoutingStatus result) After a message is sentvoidafterSessionMetadataAdded(ServerSession session, String key, String data) After session metadata is added to the sessionvoidbeforeCloseConsumer(ServerConsumer consumer, boolean failed) Before a consumer is closedvoidbeforeCloseSession(ServerSession session, boolean failed) Before a session is closedvoidbeforeCreateConsumer(long consumerID, QueueBinding queueBinding, SimpleString filterString, boolean browseOnly, boolean supportLargeMessage) Before a consumer is createdvoidbeforeCreateQueue(QueueConfiguration queueConfig) Before a queue is createdvoidbeforeCreateSession(String name, String username, int minLargeMessageSize, RemotingConnection connection, boolean autoCommitSends, boolean autoCommitAcks, boolean preAcknowledge, boolean xa, String publicAddress, SessionCallback callback, boolean autoCreateQueues, OperationContext context, Map<SimpleString, RoutingType> prefixes) Before a session is created.voidbeforeDeliver(ServerConsumer consumer, MessageReference reference) Before a message is delivered to a client consumervoidBefore a bridge is deployedvoidbeforeDestroyQueue(SimpleString queueName, SecurityAuth session, boolean checkConsumerCount, boolean removeConsumers, boolean autoDeleteAddress) Before a queue is destroyedvoidbeforeMessageRoute(Message message, RoutingContext context, boolean direct, boolean rejectDuplicates) Before a message is routedvoidbeforeSend(ServerSession session, Transaction tx, Message message, boolean direct, boolean noAutoCreateQueue) Before a message is sentvoidbeforeSessionMetadataAdded(ServerSession session, String key, String data) Before session metadata is added to the sessionvoidcriticalFailure(CriticalComponent components) A Critical failure has been detected.voidused to pass configured properties to PluginbooleanisLogAll()booleanbooleanbooleanbooleanbooleanbooleanvoidmessageAcknowledged(Transaction tx, MessageReference ref, AckReason reason, ServerConsumer consumer) A message has been acknowledgedvoidmessageExpired(MessageReference message, SimpleString messageExpiryAddress, ServerConsumer consumer) A message has been expiredvoidonMessageRouteException(Message message, RoutingContext context, boolean direct, boolean rejectDuplicates, Exception e) When there was an error routing the messagevoidonSendException(ServerSession session, Transaction tx, Message message, boolean direct, boolean noAutoCreateQueue, Exception e) When there was an exception sending the messageMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.activemq.artemis.core.server.plugin.ActiveMQServerAddressPlugin
afterAddAddress, afterRemoveAddress, afterUpdateAddress, beforeAddAddress, beforeRemoveAddress, beforeUpdateAddressMethods inherited from interface org.apache.activemq.artemis.core.server.plugin.ActiveMQServerBasePlugin
registered, setInit, unregisteredMethods inherited from interface org.apache.activemq.artemis.core.server.plugin.ActiveMQServerBindingPlugin
afterAddBinding, afterRemoveBinding, beforeAddBinding, beforeRemoveBindingMethods inherited from interface org.apache.activemq.artemis.core.server.plugin.ActiveMQServerBridgePlugin
afterAcknowledgeBridge, afterDeliverBridge, beforeDeliverBridgeMethods inherited from interface org.apache.activemq.artemis.core.server.plugin.ActiveMQServerConsumerPlugin
beforeCreateConsumerMethods inherited from interface org.apache.activemq.artemis.core.server.plugin.ActiveMQServerFederationPlugin
afterCloseFederatedQueueConsumer, afterCreateFederatedQueueConsumer, afterFederatedQueueConsumerMessageHandled, beforeCloseFederatedQueueConsumer, beforeCreateFederatedQueueConsumer, beforeFederatedQueueConsumerMessageHandled, federatedAddressConditionalCreateConsumer, federatedAddressConditionalCreateDivertConsumer, federatedQueueConditionalCreateConsumer, federationStreamStarted, federationStreamStoppedMethods inherited from interface org.apache.activemq.artemis.core.server.plugin.ActiveMQServerMessagePlugin
afterDeliver, afterSend, beforeDeliver, beforeSend, canAccept, messageAcknowledged, messageAcknowledged, messageExpired, messageMovedMethods inherited from interface org.apache.activemq.artemis.core.server.plugin.ActiveMQServerQueuePlugin
afterExpiryScan, beforeCreateQueue, beforeDestroyQueue, beforeExpiryScanMethods inherited from interface org.apache.activemq.artemis.core.server.plugin.ActiveMQServerResourcePlugin
afterPutTransaction, afterRemoveTransaction, beforePutTransaction, beforeRemoveTransactionMethods inherited from interface org.apache.activemq.artemis.core.server.plugin.ActiveMQServerSessionPlugin
duplicateSessionMetadataFailure
-
Field Details
-
LOG_ALL_EVENTS
- See Also:
-
LOG_CONNECTION_EVENTS
- See Also:
-
LOG_SESSION_EVENTS
- See Also:
-
LOG_CONSUMER_EVENTS
- See Also:
-
LOG_DELIVERING_EVENTS
- See Also:
-
LOG_SENDING_EVENTS
- See Also:
-
LOG_INTERNAL_EVENTS
- See Also:
-
UNAVAILABLE
- See Also:
-
-
Constructor Details
-
LoggingActiveMQServerPlugin
public LoggingActiveMQServerPlugin()
-
-
Method Details
-
isLogAll
public boolean isLogAll() -
isLogConnectionEvents
public boolean isLogConnectionEvents() -
isLogSessionEvents
public boolean isLogSessionEvents() -
isLogConsumerEvents
public boolean isLogConsumerEvents() -
isLogDeliveringEvents
public boolean isLogDeliveringEvents() -
isLogSendingEvents
public boolean isLogSendingEvents() -
isLogInternalEvents
public boolean isLogInternalEvents() -
init
used to pass configured properties to Plugin- Specified by:
initin interfaceActiveMQServerBasePlugin
-
afterCreateConnection
A connection has been created.- Specified by:
afterCreateConnectionin interfaceActiveMQServerConnectionPlugin- Parameters:
connection- The newly created connection- Throws:
ActiveMQException
-
afterDestroyConnection
A connection has been destroyed.- Specified by:
afterDestroyConnectionin interfaceActiveMQServerConnectionPlugin- Throws:
ActiveMQException
-
beforeCreateSession
public void beforeCreateSession(String name, String username, int minLargeMessageSize, RemotingConnection connection, boolean autoCommitSends, boolean autoCommitAcks, boolean preAcknowledge, boolean xa, String publicAddress, SessionCallback callback, boolean autoCreateQueues, OperationContext context, Map<SimpleString, RoutingType> prefixes) throws ActiveMQExceptionBefore a session is created.- Specified by:
beforeCreateSessionin interfaceActiveMQServerSessionPlugin- Throws:
ActiveMQException
-
afterCreateSession
After a session has been created.- Specified by:
afterCreateSessionin interfaceActiveMQServerSessionPlugin- Parameters:
session- The newly created session- Throws:
ActiveMQException
-
beforeCloseSession
Before a session is closed- Specified by:
beforeCloseSessionin interfaceActiveMQServerSessionPlugin- Throws:
ActiveMQException
-
afterCloseSession
After a session is closed- Specified by:
afterCloseSessionin interfaceActiveMQServerSessionPlugin- Throws:
ActiveMQException
-
beforeSessionMetadataAdded
public void beforeSessionMetadataAdded(ServerSession session, String key, String data) throws ActiveMQException Before session metadata is added to the session- Specified by:
beforeSessionMetadataAddedin interfaceActiveMQServerSessionPlugin- Throws:
ActiveMQException
-
afterSessionMetadataAdded
public void afterSessionMetadataAdded(ServerSession session, String key, String data) throws ActiveMQException After session metadata is added to the session- Specified by:
afterSessionMetadataAddedin interfaceActiveMQServerSessionPlugin- Throws:
ActiveMQException
-
beforeCreateConsumer
public void beforeCreateConsumer(long consumerID, QueueBinding queueBinding, SimpleString filterString, boolean browseOnly, boolean supportLargeMessage) throws ActiveMQException Before a consumer is created- Specified by:
beforeCreateConsumerin interfaceActiveMQServerConsumerPlugin- Throws:
ActiveMQException
-
afterCreateConsumer
After a consumer has been created- Specified by:
afterCreateConsumerin interfaceActiveMQServerConsumerPlugin- Parameters:
consumer- the created consumer- Throws:
ActiveMQException
-
beforeCloseConsumer
Before a consumer is closed- Specified by:
beforeCloseConsumerin interfaceActiveMQServerConsumerPlugin- Throws:
ActiveMQException
-
afterCloseConsumer
After a consumer is closed- Specified by:
afterCloseConsumerin interfaceActiveMQServerConsumerPlugin- Throws:
ActiveMQException
-
beforeCreateQueue
Before a queue is created- Specified by:
beforeCreateQueuein interfaceActiveMQServerQueuePlugin- Throws:
ActiveMQException
-
afterCreateQueue
After a queue has been created- Specified by:
afterCreateQueuein interfaceActiveMQServerQueuePlugin- Parameters:
queue- The newly created queue- Throws:
ActiveMQException
-
beforeDestroyQueue
public void beforeDestroyQueue(SimpleString queueName, SecurityAuth session, boolean checkConsumerCount, boolean removeConsumers, boolean autoDeleteAddress) throws ActiveMQException Before a queue is destroyed- Specified by:
beforeDestroyQueuein interfaceActiveMQServerQueuePlugin- Throws:
ActiveMQException
-
afterDestroyQueue
public void afterDestroyQueue(Queue queue, SimpleString address, SecurityAuth session, boolean checkConsumerCount, boolean removeConsumers, boolean autoDeleteAddress) throws ActiveMQException After a queue has been destroyed- Specified by:
afterDestroyQueuein interfaceActiveMQServerQueuePlugin- Throws:
ActiveMQException
-
beforeSend
public void beforeSend(ServerSession session, Transaction tx, Message message, boolean direct, boolean noAutoCreateQueue) throws ActiveMQException Before a message is sent- Specified by:
beforeSendin interfaceActiveMQServerMessagePlugin- Parameters:
session- the session that sends the message- Throws:
ActiveMQException
-
afterSend
public void afterSend(ServerSession session, Transaction tx, Message message, boolean direct, boolean noAutoCreateQueue, RoutingStatus result) throws ActiveMQException After a message is sent- Specified by:
afterSendin interfaceActiveMQServerMessagePlugin- Parameters:
session- the session that sends the message- Throws:
ActiveMQException
-
onSendException
public void onSendException(ServerSession session, Transaction tx, Message message, boolean direct, boolean noAutoCreateQueue, Exception e) throws ActiveMQException Description copied from interface:ActiveMQServerMessagePluginWhen there was an exception sending the message- Specified by:
onSendExceptionin interfaceActiveMQServerMessagePlugine- the exception that occurred when sending the message- Throws:
ActiveMQException
-
beforeMessageRoute
public void beforeMessageRoute(Message message, RoutingContext context, boolean direct, boolean rejectDuplicates) throws ActiveMQException Before a message is routed- Specified by:
beforeMessageRoutein interfaceActiveMQServerMessagePlugin- Throws:
ActiveMQException
-
afterMessageRoute
public void afterMessageRoute(Message message, RoutingContext context, boolean direct, boolean rejectDuplicates, RoutingStatus result) throws ActiveMQException After a message is routed- Specified by:
afterMessageRoutein interfaceActiveMQServerMessagePlugin- Throws:
ActiveMQException
-
onMessageRouteException
public void onMessageRouteException(Message message, RoutingContext context, boolean direct, boolean rejectDuplicates, Exception e) throws ActiveMQException Description copied from interface:ActiveMQServerMessagePluginWhen there was an error routing the message- Specified by:
onMessageRouteExceptionin interfaceActiveMQServerMessagePlugine- the exception that occurred during message routing- Throws:
ActiveMQException
-
beforeDeliver
public void beforeDeliver(ServerConsumer consumer, MessageReference reference) throws ActiveMQException Before a message is delivered to a client consumer- Specified by:
beforeDeliverin interfaceActiveMQServerMessagePlugin- Parameters:
consumer- the consumer the message will be delivered toreference- message reference- Throws:
ActiveMQException
-
afterDeliver
public void afterDeliver(ServerConsumer consumer, MessageReference reference) throws ActiveMQException After a message is delivered to a client consumer- Specified by:
afterDeliverin interfaceActiveMQServerMessagePlugin- Parameters:
consumer- the consumer the message was delivered toreference- message reference- Throws:
ActiveMQException
-
messageExpired
public void messageExpired(MessageReference message, SimpleString messageExpiryAddress, ServerConsumer consumer) Description copied from interface:ActiveMQServerMessagePluginA message has been expired- Specified by:
messageExpiredin interfaceActiveMQServerMessagePlugin- Parameters:
message- The expired messagemessageExpiryAddress- The message expiry address if existsconsumer- the Consumer that acknowledged the message - this field is optional and can be null
-
messageAcknowledged
public void messageAcknowledged(Transaction tx, MessageReference ref, AckReason reason, ServerConsumer consumer) throws ActiveMQException A message has been acknowledged- Specified by:
messageAcknowledgedin interfaceActiveMQServerMessagePlugin- Parameters:
tx- The transaction for the ackref- The acked messagereason- The ack reasonconsumer- The consumer acking the ref- Throws:
ActiveMQException
-
beforeDeployBridge
Before a bridge is deployed- Specified by:
beforeDeployBridgein interfaceActiveMQServerBridgePlugin- Parameters:
config- The bridge configuration- Throws:
ActiveMQException
-
afterDeployBridge
After a bridge has been deployed- Specified by:
afterDeployBridgein interfaceActiveMQServerBridgePlugin- Parameters:
bridge- The newly deployed bridge- Throws:
ActiveMQException
-
criticalFailure
A Critical failure has been detected. This will be called before the broker is stopped- Specified by:
criticalFailurein interfaceActiveMQServerCriticalPlugin- Throws:
ActiveMQException
-