Class AbstractDeadLetterStrategy
java.lang.Object
org.apache.activemq.broker.region.policy.AbstractDeadLetterStrategy
- All Implemented Interfaces:
DeadLetterStrategy
- Direct Known Subclasses:
IndividualDeadLetterStrategy,SharedDeadLetterStrategy
A strategy for choosing which destination is used for dead letter queue
messages.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongabstract intabstract intbooleanbooleanbooleanbooleanisSendToDeadLetterQueue(org.apache.activemq.command.Message message) Allow pluggable strategy for deciding if message should be sent to a dead letter queue for example, you might not want to ignore expired or non-persistent messagesprotected abstract org.apache.activemq.ActiveMQMessageAuditlookupActiveMQMessageAudit(org.apache.activemq.command.Message message, boolean rollback) voidrollback(org.apache.activemq.command.Message message) Allows for a Message that was already processed by a DLQ to be rolled back in case of a move or a retry of that message, otherwise the Message would be considered a duplicate if this strategy is doing Message Auditing.voidsetEnableAudit(boolean enableAudit) voidsetExpiration(long expiration) The expiration value to use on messages sent to the DLQ, default 0abstract voidsetMaxAuditDepth(int maxAuditDepth) abstract voidsetMaxProducersToAudit(int maxProducersToAudit) voidsetProcessExpired(boolean processExpired) voidsetProcessNonPersistent(boolean processNonPersistent) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.activemq.broker.region.policy.DeadLetterStrategy
getDeadLetterQueueFor
-
Constructor Details
-
AbstractDeadLetterStrategy
public AbstractDeadLetterStrategy()
-
-
Method Details
-
rollback
public void rollback(org.apache.activemq.command.Message message) Description copied from interface:DeadLetterStrategyAllows for a Message that was already processed by a DLQ to be rolled back in case of a move or a retry of that message, otherwise the Message would be considered a duplicate if this strategy is doing Message Auditing.- Specified by:
rollbackin interfaceDeadLetterStrategy
-
isSendToDeadLetterQueue
public boolean isSendToDeadLetterQueue(org.apache.activemq.command.Message message) Description copied from interface:DeadLetterStrategyAllow pluggable strategy for deciding if message should be sent to a dead letter queue for example, you might not want to ignore expired or non-persistent messages- Specified by:
isSendToDeadLetterQueuein interfaceDeadLetterStrategy- Returns:
- true if message should be sent to a dead letter queue
-
isProcessExpired
public boolean isProcessExpired()- Specified by:
isProcessExpiredin interfaceDeadLetterStrategy- Returns:
- the processExpired
-
setProcessExpired
public void setProcessExpired(boolean processExpired) - Specified by:
setProcessExpiredin interfaceDeadLetterStrategy- Parameters:
processExpired- the processExpired to set
-
isProcessNonPersistent
public boolean isProcessNonPersistent()- Specified by:
isProcessNonPersistentin interfaceDeadLetterStrategy- Returns:
- the processNonPersistent
-
setProcessNonPersistent
public void setProcessNonPersistent(boolean processNonPersistent) - Specified by:
setProcessNonPersistentin interfaceDeadLetterStrategy- Parameters:
processNonPersistent- the processNonPersistent to set
-
isEnableAudit
public boolean isEnableAudit() -
setEnableAudit
public void setEnableAudit(boolean enableAudit) -
getExpiration
public long getExpiration()- Specified by:
getExpirationin interfaceDeadLetterStrategy
-
setExpiration
public void setExpiration(long expiration) Description copied from interface:DeadLetterStrategyThe expiration value to use on messages sent to the DLQ, default 0- Specified by:
setExpirationin interfaceDeadLetterStrategy
-
getMaxProducersToAudit
public abstract int getMaxProducersToAudit() -
setMaxProducersToAudit
public abstract void setMaxProducersToAudit(int maxProducersToAudit) -
setMaxAuditDepth
public abstract void setMaxAuditDepth(int maxAuditDepth) -
getMaxAuditDepth
public abstract int getMaxAuditDepth() -
lookupActiveMQMessageAudit
protected abstract org.apache.activemq.ActiveMQMessageAudit lookupActiveMQMessageAudit(org.apache.activemq.command.Message message, boolean rollback)
-