public class LoggingBrokerPlugin extends BrokerPluginSupport
next| Constructor and Description |
|---|
LoggingBrokerPlugin() |
| Modifier and Type | Method and Description |
|---|---|
void |
acknowledge(ConsumerBrokerExchange consumerExchange,
org.apache.activemq.command.MessageAck ack)
Used to acknowledge the receipt of a message by a client.
|
void |
addBroker(Connection connection,
org.apache.activemq.command.BrokerInfo info)
A remote Broker connects
|
void |
addConnection(ConnectionContext context,
org.apache.activemq.command.ConnectionInfo info)
A client is establishing a connection with the broker.
|
Subscription |
addConsumer(ConnectionContext context,
org.apache.activemq.command.ConsumerInfo info)
Adds a consumer.
|
Destination |
addDestination(ConnectionContext context,
org.apache.activemq.command.ActiveMQDestination destination,
boolean create)
Used to create a destination.
|
void |
addDestinationInfo(ConnectionContext context,
org.apache.activemq.command.DestinationInfo info)
Add and process a DestinationInfo object
|
void |
addProducer(ConnectionContext context,
org.apache.activemq.command.ProducerInfo info)
Adds a producer.
|
void |
addSession(ConnectionContext context,
org.apache.activemq.command.SessionInfo info)
Adds a session.
|
void |
afterPropertiesSet() |
void |
beginTransaction(ConnectionContext context,
org.apache.activemq.command.TransactionId xid)
Starts a transaction.
|
void |
commitTransaction(ConnectionContext context,
org.apache.activemq.command.TransactionId xid,
boolean onePhase)
Commits a transaction.
|
void |
fastProducer(ConnectionContext context,
org.apache.activemq.command.ProducerInfo producerInfo,
org.apache.activemq.command.ActiveMQDestination destination)
Called to notify a producer is too fast
|
void |
forgetTransaction(ConnectionContext context,
org.apache.activemq.command.TransactionId transactionId)
Forgets a transaction.
|
Connection[] |
getClients() |
org.apache.activemq.command.ActiveMQDestination[] |
getDestinations() |
Set<org.apache.activemq.command.ActiveMQDestination> |
getDurableDestinations() |
org.apache.activemq.command.BrokerInfo[] |
getPeerBrokerInfos()
Get the BrokerInfo's of any connected Brokers
|
org.apache.activemq.command.TransactionId[] |
getPreparedTransactions(ConnectionContext context)
Gets a list of all the prepared xa transactions.
|
void |
isFull(ConnectionContext context,
Destination destination,
org.apache.activemq.usage.Usage<?> usage)
Called when a Usage reaches a limit
|
boolean |
isLogAll() |
boolean |
isLogConnectionEvents() |
boolean |
isLogConsumerEvents() |
boolean |
isLogInternalEvents() |
boolean |
isLogProducerEvents() |
boolean |
isLogSessionEvents() |
boolean |
isLogTransactionEvents() |
boolean |
isPerDestinationLogger() |
void |
messageConsumed(ConnectionContext context,
org.apache.activemq.broker.region.MessageReference messageReference)
called when message is consumed
|
void |
messageDelivered(ConnectionContext context,
org.apache.activemq.broker.region.MessageReference messageReference)
Called when message is delivered to the broker
|
void |
messageDiscarded(ConnectionContext context,
Subscription sub,
org.apache.activemq.broker.region.MessageReference messageReference)
Called when a message is discarded - e.g.
|
void |
messageExpired(ConnectionContext context,
org.apache.activemq.broker.region.MessageReference message,
Subscription subscription)
A Message has Expired
|
org.apache.activemq.command.Response |
messagePull(ConnectionContext context,
org.apache.activemq.command.MessagePull pull)
Allows a consumer to pull a message from a queue
|
void |
nowMasterBroker()
called when the broker becomes the master in a master/slave
configuration
|
void |
postProcessDispatch(org.apache.activemq.command.MessageDispatch messageDispatch)
Notify the Broker that a dispatch has happened
|
int |
prepareTransaction(ConnectionContext context,
org.apache.activemq.command.TransactionId xid)
Prepares a transaction.
|
void |
preProcessDispatch(org.apache.activemq.command.MessageDispatch messageDispatch)
Notify the Broker that a dispatch is going to happen
|
void |
processDispatchNotification(org.apache.activemq.command.MessageDispatchNotification messageDispatchNotification)
Process a notification of a dispatch - used by a Slave Broker
|
void |
removeBroker(Connection connection,
org.apache.activemq.command.BrokerInfo info)
Remove a BrokerInfo
|
void |
removeConnection(ConnectionContext context,
org.apache.activemq.command.ConnectionInfo info,
Throwable error)
A client is disconnecting from the broker.
|
void |
removeConsumer(ConnectionContext context,
org.apache.activemq.command.ConsumerInfo info)
Removes a consumer.
|
void |
removeDestination(ConnectionContext context,
org.apache.activemq.command.ActiveMQDestination destination,
long timeout)
Used to destroy a destination.
|
void |
removeDestinationInfo(ConnectionContext context,
org.apache.activemq.command.DestinationInfo info)
Remove and process a DestinationInfo object
|
void |
removeProducer(ConnectionContext context,
org.apache.activemq.command.ProducerInfo info)
Removes a producer.
|
void |
removeSession(ConnectionContext context,
org.apache.activemq.command.SessionInfo info)
Removes a session.
|
void |
removeSubscription(ConnectionContext context,
org.apache.activemq.command.RemoveSubscriptionInfo info)
Deletes a durable subscription.
|
void |
rollbackTransaction(ConnectionContext context,
org.apache.activemq.command.TransactionId xid)
Rollsback a transaction.
|
void |
send(ProducerBrokerExchange producerExchange,
org.apache.activemq.command.Message messageSend)
Send a message to the broker to using the specified destination.
|
boolean |
sendToDeadLetterQueue(ConnectionContext context,
org.apache.activemq.broker.region.MessageReference messageReference,
Subscription subscription,
Throwable poisonCause)
A message needs to go the a DLQ
|
void |
setLogAll(boolean logAll)
Logger all Events that go through the Plugin
|
void |
setLogConnectionEvents(boolean logConnectionEvents)
Logger Events that are related to connections
|
void |
setLogConsumerEvents(boolean logConsumerEvents)
Logger Events that are related to Consumers
|
void |
setLogInternalEvents(boolean logInternalEvents)
Logger Events that are normally internal to the broker
|
void |
setLogProducerEvents(boolean logProducerEvents)
Logger Events that are related to Producers
|
void |
setLogSessionEvents(boolean logSessionEvents)
Logger Events that are related to sessions
|
void |
setLogTransactionEvents(boolean logTransactionEvents)
Logger Events that are related to transaction processing
|
void |
setPerDestinationLogger(boolean perDestinationLogger) |
void |
slowConsumer(ConnectionContext context,
Destination destination,
Subscription subs)
Called when there is a slow consumer
|
void |
start() |
void |
stop() |
String |
toString() |
installPlugingetAdaptor, getNext, setNextbrokerServiceStarted, gc, getAdminConnectionContext, getBrokerId, getBrokerName, getBrokerSequenceId, getBrokerService, getDestinationMap, getDestinationMap, getDestinations, getExecutor, getRoot, getScheduler, getTempDataStore, getVmConnectorURI, isExpired, isFaultTolerantConfiguration, isStopped, networkBridgeStarted, networkBridgeStopped, processConsumerControl, reapplyInterceptor, setAdminConnectionContext, virtualDestinationAdded, virtualDestinationRemovedpublic LoggingBrokerPlugin()
public void afterPropertiesSet() throws Exception
Exceptionpublic boolean isLogAll()
public void setLogAll(boolean logAll)
public boolean isLogConnectionEvents()
public void setLogConnectionEvents(boolean logConnectionEvents)
public boolean isLogSessionEvents()
public void setLogSessionEvents(boolean logSessionEvents)
public boolean isLogTransactionEvents()
public void setLogTransactionEvents(boolean logTransactionEvents)
public boolean isLogConsumerEvents()
public void setLogConsumerEvents(boolean logConsumerEvents)
public boolean isLogProducerEvents()
public void setLogProducerEvents(boolean logProducerEvents)
public boolean isLogInternalEvents()
public void setLogInternalEvents(boolean logInternalEvents)
public void acknowledge(ConsumerBrokerExchange consumerExchange, org.apache.activemq.command.MessageAck ack) throws Exception
Regionacknowledge in interface Regionacknowledge in class BrokerFilterconsumerExchange - the environment the operation is being executed under.Exception - TODOpublic org.apache.activemq.command.Response messagePull(ConnectionContext context, org.apache.activemq.command.MessagePull pull) throws Exception
RegionmessagePull in interface RegionmessagePull in class BrokerFilterExceptionpublic void addConnection(ConnectionContext context, org.apache.activemq.command.ConnectionInfo info) throws Exception
BrokeraddConnection in interface BrokeraddConnection in class BrokerFilterException - TODOpublic Subscription addConsumer(ConnectionContext context, org.apache.activemq.command.ConsumerInfo info) throws Exception
RegionaddConsumer in interface RegionaddConsumer in class BrokerFiltercontext - the environment the operation is being executed under.Exception - TODOpublic void addProducer(ConnectionContext context, org.apache.activemq.command.ProducerInfo info) throws Exception
BrokeraddProducer in interface BrokeraddProducer in interface RegionaddProducer in class BrokerFiltercontext - the environment the operation is being executed under.Exception - TODOpublic void commitTransaction(ConnectionContext context, org.apache.activemq.command.TransactionId xid, boolean onePhase) throws Exception
BrokercommitTransaction in interface BrokercommitTransaction in class BrokerFilterException - TODOpublic void removeSubscription(ConnectionContext context, org.apache.activemq.command.RemoveSubscriptionInfo info) throws Exception
RegionremoveSubscription in interface RegionremoveSubscription in class BrokerFiltercontext - the environment the operation is being executed under.info - TODOException - TODOpublic org.apache.activemq.command.TransactionId[] getPreparedTransactions(ConnectionContext context) throws Exception
BrokergetPreparedTransactions in interface BrokergetPreparedTransactions in class BrokerFiltercontext - transaction idsException - TODOpublic int prepareTransaction(ConnectionContext context, org.apache.activemq.command.TransactionId xid) throws Exception
BrokerprepareTransaction in interface BrokerprepareTransaction in class BrokerFilterException - TODOpublic void removeConnection(ConnectionContext context, org.apache.activemq.command.ConnectionInfo info, Throwable error) throws Exception
BrokerremoveConnection in interface BrokerremoveConnection in class BrokerFiltercontext - the environment the operation is being executed under.error - null if the client requested the disconnect or the error
that caused the client to disconnect.Exception - TODOpublic void removeConsumer(ConnectionContext context, org.apache.activemq.command.ConsumerInfo info) throws Exception
RegionremoveConsumer in interface RegionremoveConsumer in class BrokerFiltercontext - the environment the operation is being executed under.Exception - TODOpublic void removeProducer(ConnectionContext context, org.apache.activemq.command.ProducerInfo info) throws Exception
BrokerremoveProducer in interface BrokerremoveProducer in interface RegionremoveProducer in class BrokerFiltercontext - the environment the operation is being executed under.Exception - TODOpublic void rollbackTransaction(ConnectionContext context, org.apache.activemq.command.TransactionId xid) throws Exception
BrokerrollbackTransaction in interface BrokerrollbackTransaction in class BrokerFilterException - TODOpublic void send(ProducerBrokerExchange producerExchange, org.apache.activemq.command.Message messageSend) throws Exception
Regionsend in interface Regionsend in class BrokerFilterproducerExchange - the environment the operation is being executed under.Exception - TODOpublic void beginTransaction(ConnectionContext context, org.apache.activemq.command.TransactionId xid) throws Exception
BrokerbeginTransaction in interface BrokerbeginTransaction in class BrokerFilterException - TODOpublic void forgetTransaction(ConnectionContext context, org.apache.activemq.command.TransactionId transactionId) throws Exception
BrokerforgetTransaction in interface BrokerforgetTransaction in class BrokerFilterExceptionpublic Connection[] getClients() throws Exception
getClients in interface BrokergetClients in class BrokerFilterException - TODOpublic Destination addDestination(ConnectionContext context, org.apache.activemq.command.ActiveMQDestination destination, boolean create) throws Exception
RegionaddDestination in interface RegionaddDestination in class BrokerFilterdestination - the destination to create.Exception - TODOpublic void removeDestination(ConnectionContext context, org.apache.activemq.command.ActiveMQDestination destination, long timeout) throws Exception
RegionremoveDestination in interface RegionremoveDestination in class BrokerFiltercontext - the environment the operation is being executed under.destination - what is being removed from the broker.timeout - the max amount of time to wait for the destination to quiesceException - TODOpublic org.apache.activemq.command.ActiveMQDestination[] getDestinations() throws Exception
getDestinations in interface BrokergetDestinations in class BrokerFilterException - TODOpublic void start() throws Exception
start in interface org.apache.activemq.Servicestart in class BrokerPluginSupportExceptionpublic void stop() throws Exception
stop in interface org.apache.activemq.Servicestop in class BrokerPluginSupportExceptionpublic void addSession(ConnectionContext context, org.apache.activemq.command.SessionInfo info) throws Exception
BrokeraddSession in interface BrokeraddSession in class BrokerFilterException - TODOpublic void removeSession(ConnectionContext context, org.apache.activemq.command.SessionInfo info) throws Exception
BrokerremoveSession in interface BrokerremoveSession in class BrokerFilterException - TODOpublic void addBroker(Connection connection, org.apache.activemq.command.BrokerInfo info)
BrokeraddBroker in interface BrokeraddBroker in class BrokerFilterpublic void removeBroker(Connection connection, org.apache.activemq.command.BrokerInfo info)
BrokerremoveBroker in interface BrokerremoveBroker in class BrokerFilterpublic org.apache.activemq.command.BrokerInfo[] getPeerBrokerInfos()
BrokergetPeerBrokerInfos in interface BrokergetPeerBrokerInfos in class BrokerFilterpublic void preProcessDispatch(org.apache.activemq.command.MessageDispatch messageDispatch)
BrokerpreProcessDispatch in interface BrokerpreProcessDispatch in class BrokerFilterpublic void postProcessDispatch(org.apache.activemq.command.MessageDispatch messageDispatch)
BrokerpostProcessDispatch in interface BrokerpostProcessDispatch in class BrokerFilterpublic void processDispatchNotification(org.apache.activemq.command.MessageDispatchNotification messageDispatchNotification) throws Exception
RegionprocessDispatchNotification in interface RegionprocessDispatchNotification in class BrokerFilterException - TODOpublic Set<org.apache.activemq.command.ActiveMQDestination> getDurableDestinations()
getDurableDestinations in interface BrokergetDurableDestinations in class BrokerFilterpublic void addDestinationInfo(ConnectionContext context, org.apache.activemq.command.DestinationInfo info) throws Exception
BrokeraddDestinationInfo in interface BrokeraddDestinationInfo in class BrokerFilterExceptionpublic void removeDestinationInfo(ConnectionContext context, org.apache.activemq.command.DestinationInfo info) throws Exception
BrokerremoveDestinationInfo in interface BrokerremoveDestinationInfo in class BrokerFilterExceptionpublic void messageExpired(ConnectionContext context, org.apache.activemq.broker.region.MessageReference message, Subscription subscription)
BrokermessageExpired in interface BrokermessageExpired in class BrokerFiltersubscription - (may be null)public boolean sendToDeadLetterQueue(ConnectionContext context, org.apache.activemq.broker.region.MessageReference messageReference, Subscription subscription, Throwable poisonCause)
BrokersendToDeadLetterQueue in interface BrokersendToDeadLetterQueue in class BrokerFilterpoisonCause - reason for dlq submission, may be nullpublic void fastProducer(ConnectionContext context, org.apache.activemq.command.ProducerInfo producerInfo, org.apache.activemq.command.ActiveMQDestination destination)
BrokerfastProducer in interface BrokerfastProducer in class BrokerFilterpublic void isFull(ConnectionContext context, Destination destination, org.apache.activemq.usage.Usage<?> usage)
BrokerisFull in interface BrokerisFull in class BrokerFilterpublic void messageConsumed(ConnectionContext context, org.apache.activemq.broker.region.MessageReference messageReference)
BrokermessageConsumed in interface BrokermessageConsumed in class BrokerFilterpublic void messageDelivered(ConnectionContext context, org.apache.activemq.broker.region.MessageReference messageReference)
BrokermessageDelivered in interface BrokermessageDelivered in class BrokerFilterpublic void messageDiscarded(ConnectionContext context, Subscription sub, org.apache.activemq.broker.region.MessageReference messageReference)
BrokermessageDiscarded in interface BrokermessageDiscarded in class BrokerFilterpublic void slowConsumer(ConnectionContext context, Destination destination, Subscription subs)
BrokerslowConsumer in interface BrokerslowConsumer in class BrokerFilterpublic void nowMasterBroker()
BrokernowMasterBroker in interface BrokernowMasterBroker in class BrokerFilterpublic void setPerDestinationLogger(boolean perDestinationLogger)
public boolean isPerDestinationLogger()
Copyright © 2005–2020 The Apache Software Foundation. All rights reserved.