Class MarkAsDeadLetterMessage
java.lang.Object
dk.cloudcreate.essentials.components.foundation.messaging.queue.operations.MarkAsDeadLetterMessage
Mark an already Queued Message as a Dead Letter Message (or Poison Message).
Dead Letter Messages won't be delivered to any
To deliver a Dead Letter Message you must first resurrect the message using
Note this method MUST be called within an existing
Operation also matches
Dead Letter Messages won't be delivered to any
DurableQueueConsumer (called by the DurableQueueConsumer)To deliver a Dead Letter Message you must first resurrect the message using
DurableQueues.resurrectDeadLetterMessage(QueueEntryId, Duration)Note this method MUST be called within an existing
UnitOfWork IF
using TransactionalMode.FullyTransactionalOperation also matches
DurableQueuesInterceptor.intercept(MarkAsDeadLetterMessage, InterceptorChain)-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionMarkAsDeadLetterMessage(QueueEntryId queueEntryId, Exception causeForBeingMarkedAsDeadLetter) Mark a Message as a Dead Letter Message (or Poison Message). -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Create a new builder that produces a newMarkAsDeadLetterMessageinstancevoidsetCauseForBeingMarkedAsDeadLetter(Exception causeForBeingMarkedAsDeadLetter) toString()voidvalidate()
-
Field Details
-
queueEntryId
-
-
Constructor Details
-
MarkAsDeadLetterMessage
public MarkAsDeadLetterMessage(QueueEntryId queueEntryId, Exception causeForBeingMarkedAsDeadLetter) Mark a Message as a Dead Letter Message (or Poison Message). Dead Letter Messages won't be delivered to anyDurableQueueConsumer(called by theDurableQueueConsumer)
To deliver a Dead Letter Message you must first resurrect the message usingDurableQueues.resurrectDeadLetterMessage(QueueEntryId, Duration)
Note this method MUST be called within an existingUnitOfWorkIF usingTransactionalMode.FullyTransactional- Parameters:
queueEntryId- the unique id of the message that must be marked as a Dead Letter MessagecauseForBeingMarkedAsDeadLetter- the reason for the message being marked as a Dead Letter Message
-
-
Method Details
-
builder
Create a new builder that produces a newMarkAsDeadLetterMessageinstance- Returns:
- a new
MarkAsDeadLetterMessageBuilderinstance
-
getQueueEntryId
- Returns:
- the unique id of the message that must be marked as a Dead Letter Message
-
getCauseForBeingMarkedAsDeadLetter
- Returns:
- the reason for the message being marked as a Dead Letter Message
-
setCauseForBeingMarkedAsDeadLetter
- Parameters:
causeForBeingMarkedAsDeadLetter- the reason for the message being marked as a Dead Letter Message
-
toString
-
validate
public void validate()
-