public abstract class AbstractDeadLetterStrategy extends Object implements DeadLetterStrategy
Constructor and Description |
---|
AbstractDeadLetterStrategy() |
Modifier and Type | Method and Description |
---|---|
long |
getExpiration() |
int |
getMaxAuditDepth() |
int |
getMaxProducersToAudit() |
boolean |
isEnableAudit() |
boolean |
isProcessExpired() |
boolean |
isProcessNonPersistent() |
boolean |
isSendToDeadLetterQueue(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 messages
|
void |
rollback(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.
|
void |
setEnableAudit(boolean enableAudit) |
void |
setExpiration(long expiration)
The expiration value to use on messages sent to the DLQ, default 0
|
void |
setMaxAuditDepth(int maxAuditDepth) |
void |
setMaxProducersToAudit(int maxProducersToAudit) |
void |
setProcessExpired(boolean processExpired) |
void |
setProcessNonPersistent(boolean processNonPersistent) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDeadLetterQueueFor
public AbstractDeadLetterStrategy()
public void rollback(Message message)
DeadLetterStrategy
rollback
in interface DeadLetterStrategy
public boolean isSendToDeadLetterQueue(Message message)
DeadLetterStrategy
isSendToDeadLetterQueue
in interface DeadLetterStrategy
public boolean isProcessExpired()
isProcessExpired
in interface DeadLetterStrategy
public void setProcessExpired(boolean processExpired)
setProcessExpired
in interface DeadLetterStrategy
processExpired
- the processExpired to setpublic boolean isProcessNonPersistent()
isProcessNonPersistent
in interface DeadLetterStrategy
public void setProcessNonPersistent(boolean processNonPersistent)
setProcessNonPersistent
in interface DeadLetterStrategy
processNonPersistent
- the processNonPersistent to setpublic boolean isEnableAudit()
public void setEnableAudit(boolean enableAudit)
public long getExpiration()
getExpiration
in interface DeadLetterStrategy
public void setExpiration(long expiration)
DeadLetterStrategy
setExpiration
in interface DeadLetterStrategy
public int getMaxProducersToAudit()
public void setMaxProducersToAudit(int maxProducersToAudit)
public void setMaxAuditDepth(int maxAuditDepth)
public int getMaxAuditDepth()
Copyright © 2005–2019 The Apache Software Foundation. All rights reserved.