Package org.apache.activemq.broker.util
Class TimeStampingBrokerPlugin
- java.lang.Object
-
- org.apache.activemq.broker.BrokerFilter
-
- org.apache.activemq.broker.MutableBrokerFilter
-
- org.apache.activemq.broker.BrokerPluginSupport
-
- org.apache.activemq.broker.util.TimeStampingBrokerPlugin
-
- All Implemented Interfaces:
Broker
,BrokerPlugin
,Region
,Service
public class TimeStampingBrokerPlugin extends BrokerPluginSupport
A Broker interceptor which updates a JMS Client's timestamp on the message with a broker timestamp. Useful when the clocks on client machines are known to not be correct and you can only trust the time set on the broker machines. Enabling this plugin will break JMS compliance since the timestamp that the producer sees on the messages after as send() will be different from the timestamp the consumer will observe when he receives the message. This plugin is not enabled in the default ActiveMQ configuration. 2 new attributes have been added which will allow the administrator some override control over the expiration time for incoming messages: Attribute 'zeroExpirationOverride' can be used to apply an expiration time to incoming messages with no expiration defined (messages that would never expire) Attribute 'ttlCeiling' can be used to apply a limit to the expiration time
-
-
Field Summary
-
Fields inherited from class org.apache.activemq.broker.MutableBrokerFilter
next
-
-
Constructor Summary
Constructors Constructor Description TimeStampingBrokerPlugin()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
send(ProducerBrokerExchange producerExchange, Message message)
Send a message to the broker to using the specified destination.void
setFutureOnly(boolean futureOnly)
void
setProcessNetworkMessages(Boolean processNetworkMessages)
void
setTtlCeiling(long ttlCeiling)
setter method for ttlCeilingvoid
setZeroExpirationOverride(long ttl)
setter method for zeroExpirationOverride-
Methods inherited from class org.apache.activemq.broker.BrokerPluginSupport
installPlugin, start, stop
-
Methods inherited from class org.apache.activemq.broker.MutableBrokerFilter
getAdaptor, getNext, setNext
-
Methods inherited from class org.apache.activemq.broker.BrokerFilter
acknowledge, addBroker, addConnection, addConsumer, addDestination, addDestinationInfo, addProducer, addSession, beginTransaction, brokerServiceStarted, commitTransaction, fastProducer, forgetTransaction, gc, getAdminConnectionContext, getBrokerId, getBrokerName, getBrokerSequenceId, getBrokerService, getClients, getDestinationMap, getDestinationMap, getDestinations, getDestinations, getDurableDestinations, getExecutor, getPeerBrokerInfos, getPreparedTransactions, getRoot, getScheduler, getTempDataStore, getVmConnectorURI, isExpired, isFaultTolerantConfiguration, isFull, isStopped, messageConsumed, messageDelivered, messageDiscarded, messageExpired, messagePull, networkBridgeStarted, networkBridgeStopped, nowMasterBroker, postProcessDispatch, prepareTransaction, preProcessDispatch, processConsumerControl, processDispatchNotification, reapplyInterceptor, removeBroker, removeConnection, removeConsumer, removeDestination, removeDestinationInfo, removeProducer, removeSession, removeSubscription, rollbackTransaction, sendToDeadLetterQueue, setAdminConnectionContext, slowConsumer, virtualDestinationAdded, virtualDestinationRemoved
-
-
-
-
Method Detail
-
setZeroExpirationOverride
public void setZeroExpirationOverride(long ttl)
setter method for zeroExpirationOverride
-
setTtlCeiling
public void setTtlCeiling(long ttlCeiling)
setter method for ttlCeiling
-
setFutureOnly
public void setFutureOnly(boolean futureOnly)
-
setProcessNetworkMessages
public void setProcessNetworkMessages(Boolean processNetworkMessages)
-
send
public void send(ProducerBrokerExchange producerExchange, Message message) throws Exception
Description copied from interface:Region
Send a message to the broker to using the specified destination. The destination specified in the message does not need to match the destination the message is sent to. This is handy in case the message is being sent to a dead letter destination.- Specified by:
send
in interfaceRegion
- Overrides:
send
in classBrokerFilter
- Parameters:
producerExchange
- the environment the operation is being executed under.- Throws:
Exception
- TODO
-
-