Package org.apache.activemq.plugin
Class ForcePersistencyModeBroker
java.lang.Object
org.apache.activemq.broker.BrokerFilter
org.apache.activemq.plugin.ForcePersistencyModeBroker
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
FieldsFields inherited from class org.apache.activemq.broker.BrokerFilter
next -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanvoidsend(ProducerBrokerExchange producerExchange, org.apache.activemq.command.Message messageSend) Sets the persistence modevoidsetPersistenceFlag(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, messageDispatched, 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
-
Field Details
-
log
public static org.slf4j.Logger log
-
-
Constructor Details
-
ForcePersistencyModeBroker
Constructor- Parameters:
next-
-
-
Method Details
-
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, org.apache.activemq.command.Message messageSend) throws Exception Sets the persistence mode- Specified by:
sendin interfaceRegion- Overrides:
sendin classBrokerFilter- Parameters:
producerExchange- the environment the operation is being executed under.- Throws:
Exception- TODO- See Also:
-