org.apache.activemq.broker.util
Class RedeliveryPlugin
java.lang.Object
org.apache.activemq.broker.MutableBrokerFilter
org.apache.activemq.broker.BrokerPluginSupport
org.apache.activemq.broker.util.RedeliveryPlugin
- All Implemented Interfaces:
- Broker, BrokerPlugin, Region, Service
public class RedeliveryPlugin
- extends BrokerPluginSupport
Replace regular DLQ handling with redelivery via a resend to the original destination
after a delay
A destination matching RedeliveryPolicy controls the quantity and delay for re-sends
If there is no matching policy or an existing policy limit is exceeded by default
regular DLQ processing resumes. This is controlled via sendToDlqIfMaxRetriesExceeded
and fallbackToDeadLetter
| Methods inherited from class org.apache.activemq.broker.MutableBrokerFilter |
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, 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, removeBroker, removeConnection, removeConsumer, removeDestination, removeDestinationInfo, removeProducer, removeSession, removeSubscription, rollbackTransaction, send, setAdminConnectionContext, setNext, slowConsumer |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
REDELIVERY_DELAY
public static final String REDELIVERY_DELAY
- See Also:
- Constant Field Values
RedeliveryPlugin
public RedeliveryPlugin()
installPlugin
public Broker installPlugin(Broker broker)
throws Exception
- Description copied from interface:
BrokerPlugin
- Installs the plugin into the interceptor chain of the broker, returning the new
intercepted broker to use.
- Specified by:
installPlugin in interface BrokerPlugin- Overrides:
installPlugin in class BrokerPluginSupport
- Throws:
Exception
getRedeliveryPolicyMap
public RedeliveryPolicyMap getRedeliveryPolicyMap()
setRedeliveryPolicyMap
public void setRedeliveryPolicyMap(RedeliveryPolicyMap redeliveryPolicyMap)
isSendToDlqIfMaxRetriesExceeded
public boolean isSendToDlqIfMaxRetriesExceeded()
setSendToDlqIfMaxRetriesExceeded
public void setSendToDlqIfMaxRetriesExceeded(boolean sendToDlqIfMaxRetriesExceeded)
- What to do if the maxretries on a matching redelivery policy is exceeded.
when true, the region broker DLQ processing will be used via sendToDeadLetterQueue
when false, there is no action
- Parameters:
sendToDlqIfMaxRetriesExceeded -
isFallbackToDeadLetter
public boolean isFallbackToDeadLetter()
setFallbackToDeadLetter
public void setFallbackToDeadLetter(boolean fallbackToDeadLetter)
- What to do if there is no matching redelivery policy for a destination.
when true, the region broker DLQ processing will be used via sendToDeadLetterQueue
when false, there is no action
- Parameters:
fallbackToDeadLetter -
sendToDeadLetterQueue
public void sendToDeadLetterQueue(ConnectionContext context,
MessageReference messageReference,
Subscription subscription)
- Description copied from interface:
Broker
- A message needs to go the a DLQ
- Specified by:
sendToDeadLetterQueue in interface Broker- Overrides:
sendToDeadLetterQueue in class MutableBrokerFilter
Copyright © 2005-2013 The Apache Software Foundation. All Rights Reserved.