@Entity public class DeadLetterEntry extends Object
JpaSequencedDeadLetterQueue to
store these into the database to be retried later.
The original message is embedded as a DeadLetterEventEntry. This is mapped, upon both storage and retrieval,
by one of the configured converters.
| Modifier | Constructor and Description |
|---|---|
protected |
DeadLetterEntry()
Constructor required by JPA.
|
|
DeadLetterEntry(String processingGroup,
String sequenceIdentifier,
long sequenceIndex,
DeadLetterEventEntry message,
Instant enqueuedAt,
Instant lastTouched,
Cause cause,
MetaData diagnostics,
Serializer serializer)
Creates a new
DeadLetterEntry consisting of the given parameters. |
| Modifier and Type | Method and Description |
|---|---|
void |
clearProcessingStarted()
Releases the message for processing by another thread or process.
|
boolean |
equals(Object o) |
String |
getCauseMessage()
Gets the message of the original exception.
|
String |
getCauseType()
Gets the class of the original exception.
|
String |
getDeadLetterId()
The unique ID of this dead letter in the database.
|
SerializedObject<byte[]> |
getDiagnostics()
Returns the serialized diagnostics.
|
Instant |
getEnqueuedAt()
The time the message was enqueued.
|
Instant |
getLastTouched()
The time the messages was last touched, meaning having been queued or having been tried to process.
|
DeadLetterEventEntry |
getMessage()
The embedded
DeadLetterEventEntry representing the original message. |
String |
getProcessingGroup()
The processing group this dead letter belongs to.
|
Instant |
getProcessingStarted()
Timestamp indicating when the processing of this dead letter has started.
|
String |
getSequenceIdentifier()
The sequence identifier of this dead letter.
|
long |
getSequenceIndex()
The index of this message within the
getSequenceIdentifier(), used for keeping the messages in the same
order within the same sequence. |
int |
hashCode() |
void |
setCause(Cause cause)
Sets the cause of the error when the message was originally processed, or processed later and the cause was
updated.
|
void |
setDiagnostics(MetaData diagnostics,
Serializer serializer)
Sets the diagnostics, taking in a
Serializer to serialize if to the correct format. |
void |
setLastTouched(Instant lastTouched)
Sets the time the message was last touched.
|
String |
toString() |
protected DeadLetterEntry()
public DeadLetterEntry(String processingGroup, String sequenceIdentifier, long sequenceIndex, DeadLetterEventEntry message, Instant enqueuedAt, Instant lastTouched, Cause cause, MetaData diagnostics, Serializer serializer)
DeadLetterEntry consisting of the given parameters.processingGroup - The processing group this message belongs to.sequenceIdentifier - The sequence identifier this message belongs to.sequenceIndex - The index of this message within the sequence.message - An embedded DeadLetterEventEntry containing all information about the message
itself.enqueuedAt - The time the message was enqueued.lastTouched - The time the message has been last processed.cause - The reason the message was enqueued.diagnostics - The diagnostics, a map of metadata.serializer - The Serializer to use for the diagnosticspublic String getDeadLetterId()
public String getProcessingGroup()
public String getSequenceIdentifier()
public long getSequenceIndex()
getSequenceIdentifier(), used for keeping the messages in the same
order within the same sequence.public DeadLetterEventEntry getMessage()
DeadLetterEventEntry representing the original message.public Instant getEnqueuedAt()
public Instant getLastTouched()
public void setLastTouched(Instant lastTouched)
lastTouched - The new time to set to.public Instant getProcessingStarted()
public String getCauseType()
public String getCauseMessage()
public SerializedObject<byte[]> getDiagnostics()
public void setCause(Cause cause)
cause - The new cause to set to.public void setDiagnostics(MetaData diagnostics, Serializer serializer)
Serializer to serialize if to the correct format.diagnostics - The new diagnostics.serializer - The Serializer to use.public void clearProcessingStarted()
Copyright © 2010–2023. All rights reserved.