org.apache.activemq.plugin
Class ForcePersistencyModeBroker
java.lang.Object
org.apache.activemq.broker.BrokerFilter
org.apache.activemq.plugin.ForcePersistencyModeBroker
- All Implemented Interfaces:
- Broker, Region, Service
public class ForcePersistencyModeBroker
- extends BrokerFilter
A Plugin which allows to force every incoming message to be PERSISTENT or NON-PERSISTENT.
Useful, if you have set the broker usage policy to process ONLY persistent or ONLY non-persistent
messages.
Methods inherited from class org.apache.activemq.broker.BrokerFilter |
acknowledge, addBroker, addConnection, addConsumer, addDestination, addDestinationInfo, addProducer, addSession, beginTransaction, brokerServiceStarted, commitTransaction, fastProducer, forgetTransaction, gc, getAdaptor, getAdminConnectionContext, getBrokerId, getBrokerName, getBrokerSequenceId, getBrokerService, getClients, getDestinationMap, getDestinations, getDestinations, getDurableDestinations, getPeerBrokerInfos, getPreparedTransactions, getRoot, getTempDataStore, getVmConnectorURI, isExpired, isFaultTolerantConfiguration, isFull, isStopped, messageConsumed, messageDelivered, messageDiscarded, messageExpired, messagePull, nowMasterBroker, postProcessDispatch, prepareTransaction, preProcessDispatch, processDispatchNotification, removeBroker, removeConnection, removeConsumer, removeDestination, removeDestinationInfo, removeProducer, removeSession, removeSubscription, rollbackTransaction, sendToDeadLetterQueue, setAdminConnectionContext, slowConsumer, start, stop |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
public static Log log
ForcePersistencyModeBroker
public ForcePersistencyModeBroker(Broker next)
- Constructor
- Parameters:
next
-
isPersistent
public boolean isPersistent()
- Returns:
- the persistenceFlag
setPersistenceFlag
public void setPersistenceFlag(boolean mode)
- Parameters:
persistenceFlag
- the persistenceFlag to set
send
public void send(ProducerBrokerExchange producerExchange,
Message messageSend)
throws Exception
- Sets the persistence mode
- Specified by:
send
in interface Region
- Overrides:
send
in class BrokerFilter
- Parameters:
producerExchange
- the environment the operation is being executed under.
- Throws:
Exception
- TODO- See Also:
BrokerFilter.send(org.apache.activemq.broker.ProducerBrokerExchange, org.apache.activemq.command.Message)
Copyright © 2005-2011 Apache Software Foundation. All Rights Reserved.