M
- The EventMessage
type of the contained message.JpaDeadLetter
which moved to
jakarta.@Deprecated public class JpaDeadLetter<M extends EventMessage<?>> extends Object implements DeadLetter<M>
DeadLetter
that was saved to the database and reconstructed from it. This object is immutable and should
only be changed using the withCause(Throwable)
, withDiagnostics(MetaData)
and
markTouched()
functions. These reconstruct a new object with the specified new properties.Constructor and Description |
---|
JpaDeadLetter(DeadLetterEntry entry,
MetaData diagnostics,
M message)
Deprecated.
Constructs a new
JpaDeadLetter from a DeadLetterEntry , deserialized diagnostics and a
reconstructed message. |
Modifier and Type | Method and Description |
---|---|
Optional<Cause> |
cause()
Deprecated.
The
cause for the DeadLetter.message() to be dead lettered. |
MetaData |
diagnostics()
Deprecated.
The diagnostic
MetaData concerning this letter. |
Instant |
enqueuedAt()
Deprecated.
The moment in time when the
DeadLetter.message() was entered in a dead letter queue. |
boolean |
equals(Object o)
Deprecated.
|
String |
getId()
Deprecated.
The ID of the entity in the database.
|
Long |
getIndex()
Deprecated.
The index of the dead letter within its sequence identified by the
sequenceIdentifier . |
String |
getSequenceIdentifier()
Deprecated.
The sequence identifier of this
DeadLetter . |
int |
hashCode()
Deprecated.
|
Instant |
lastTouched()
Deprecated.
The moment in time when this letter was last touched.
|
DeadLetter<M> |
markTouched()
Deprecated.
Construct a copy of this
DeadLetter , replacing the DeadLetter.lastTouched() with the current time. |
M |
message()
Deprecated.
The
Message of type M contained in this letter. |
String |
toString()
Deprecated.
|
DeadLetter<M> |
withCause(Throwable requeueCause)
Deprecated.
|
DeadLetter<M> |
withDiagnostics(MetaData diagnostics)
Deprecated.
Construct a copy of this
DeadLetter , replacing the DeadLetter.diagnostics() with the given
diagnostics . |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
withDiagnostics
public JpaDeadLetter(DeadLetterEntry entry, MetaData diagnostics, M message)
JpaDeadLetter
from a DeadLetterEntry
, deserialized diagnostics and a
reconstructed message.entry
- The DeadLetterEntry
to construct this letter from.diagnostics
- The deserialized diagnostics MetaData
.message
- The reconstructed EventMessage
.public M message()
DeadLetter
Message
of type M
contained in this letter.message
in interface DeadLetter<M extends EventMessage<?>>
Message
of type M
contained in this letter.public Optional<Cause> cause()
DeadLetter
cause
for the DeadLetter.message()
to be dead lettered. Can be an Optional.empty()
in
case this letter is enqueued without a causal error. For instance, when another letter already present in the
queue was blocking it being handled.cause
in interface DeadLetter<M extends EventMessage<?>>
cause
for the DeadLetter.message()
to be dead lettered.public Instant enqueuedAt()
DeadLetter
DeadLetter.message()
was entered in a dead letter queue.enqueuedAt
in interface DeadLetter<M extends EventMessage<?>>
DeadLetter.message()
was entered in a dead letter queue.public Instant lastTouched()
DeadLetter
DeadLetter.enqueuedAt()
value if this letter
is enqueued for the first time.lastTouched
in interface DeadLetter<M extends EventMessage<?>>
public MetaData diagnostics()
DeadLetter
MetaData
concerning this letter.diagnostics
in interface DeadLetter<M extends EventMessage<?>>
MetaData
concerning this letter.public String getId()
JpaDeadLetter
.public Long getIndex()
sequenceIdentifier
. Will ensure the
events are kept in the original order.JpaDeadLetter
.public String getSequenceIdentifier()
DeadLetter
. If letters belong to the same sequence, they should be
handled sequentially at all times. This is ensured by the getIndex()
property.DeadLetter
.public DeadLetter<M> markTouched()
DeadLetter
DeadLetter
, replacing the DeadLetter.lastTouched()
with the current time.markTouched
in interface DeadLetter<M extends EventMessage<?>>
DeadLetter
with DeadLetter.lastTouched()
set to now.public DeadLetter<M> withCause(Throwable requeueCause)
DeadLetter
withCause
in interface DeadLetter<M extends EventMessage<?>>
requeueCause
- The new cause of the DeadLetter
under construction.DeadLetter
, replacing the DeadLetter.cause()
with the given requeueCause
.public DeadLetter<M> withDiagnostics(MetaData diagnostics)
DeadLetter
DeadLetter
, replacing the DeadLetter.diagnostics()
with the given
diagnostics
.withDiagnostics
in interface DeadLetter<M extends EventMessage<?>>
diagnostics
- The diagnostic MetaData
to append to the DeadLetter
under construction.DeadLetter
, replacing the DeadLetter.diagnostics()
with the given
diagnostics
.Copyright © 2010–2024. All rights reserved.