Package org.apache.activemq.plugin
Class ForcePersistencyModeBroker
- java.lang.Object
-
- org.apache.activemq.broker.BrokerFilter
-
- org.apache.activemq.plugin.ForcePersistencyModeBroker
-
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.
-
-
Field Summary
Fields Modifier and Type Field Description static org.slf4j.Logger
log
-
Fields inherited from class org.apache.activemq.broker.BrokerFilter
next
-
-
Constructor Summary
Constructors Constructor Description ForcePersistencyModeBroker(Broker next)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isPersistent()
void
send(ProducerBrokerExchange producerExchange, Message messageSend)
Sets the persistence modevoid
setPersistenceFlag(boolean mode)
-
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, getDestinationMap, getDestinations, getDestinations, getDurableDestinations, getExecutor, getNext, 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, start, stop, virtualDestinationAdded, virtualDestinationRemoved
-
-
-
-
Constructor Detail
-
ForcePersistencyModeBroker
public ForcePersistencyModeBroker(Broker next)
Constructor- Parameters:
next
-
-
-
Method Detail
-
isPersistent
public boolean isPersistent()
- Returns:
- the persistenceFlag
-
setPersistenceFlag
public void setPersistenceFlag(boolean mode)
- Parameters:
mode
- the persistenceFlag to set
-
send
public void send(ProducerBrokerExchange producerExchange, Message messageSend) throws Exception
Sets the persistence mode- Specified by:
send
in interfaceRegion
- Overrides:
send
in classBrokerFilter
- 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)
-
-