Class JpaDeadLetter<M extends EventMessage<?>>
java.lang.Object
org.axonframework.eventhandling.deadletter.legacyjpa.JpaDeadLetter<M>
- Type Parameters:
M- TheEventMessagetype of the contained message.
- All Implemented Interfaces:
DeadLetter<M>
@Deprecated
public class JpaDeadLetter<M extends EventMessage<?>>
extends Object
implements DeadLetter<M>
Deprecated.
A
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.- Since:
- 4.6.0
- Author:
- Mitchell Herrijgers
-
Constructor Summary
ConstructorsConstructorDescriptionJpaDeadLetter(DeadLetterEntry entry, MetaData diagnostics, M message) Deprecated.Constructs a newJpaDeadLetterfrom aDeadLetterEntry, deserialized diagnostics and a reconstructed message. -
Method Summary
Modifier and TypeMethodDescriptioncause()Deprecated.Thecausefor theDeadLetter.message()to be dead lettered.Deprecated.The diagnosticMetaDataconcerning this letter.Deprecated.The moment in time when theDeadLetter.message()was entered in a dead letter queue.booleanDeprecated.getId()Deprecated.The ID of the entity in the database.getIndex()Deprecated.The index of the dead letter within its sequence identified by thesequenceIdentifier.Deprecated.The sequence identifier of thisDeadLetter.inthashCode()Deprecated.Deprecated.The moment in time when this letter was last touched.Deprecated.Construct a copy of thisDeadLetter, replacing theDeadLetter.lastTouched()with the current time.message()Deprecated.TheMessageof typeMcontained in this letter.toString()Deprecated.Deprecated.withDiagnostics(MetaData diagnostics) Deprecated.Construct a copy of thisDeadLetter, replacing theDeadLetter.diagnostics()with the givendiagnostics.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.axonframework.messaging.deadletter.DeadLetter
withDiagnostics
-
Constructor Details
-
JpaDeadLetter
Deprecated.Constructs a newJpaDeadLetterfrom aDeadLetterEntry, deserialized diagnostics and a reconstructed message.- Parameters:
entry- TheDeadLetterEntryto construct this letter from.diagnostics- The deserialized diagnosticsMetaData.message- The reconstructedEventMessage.
-
-
Method Details
-
message
Deprecated.Description copied from interface:DeadLetterTheMessageof typeMcontained in this letter.- Specified by:
messagein interfaceDeadLetter<M extends EventMessage<?>>- Returns:
- The
Messageof typeMcontained in this letter.
-
cause
Deprecated.Description copied from interface:DeadLetterThecausefor theDeadLetter.message()to be dead lettered. Can be anOptional.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.- Specified by:
causein interfaceDeadLetter<M extends EventMessage<?>>- Returns:
- The
causefor theDeadLetter.message()to be dead lettered.
-
enqueuedAt
Deprecated.Description copied from interface:DeadLetterThe moment in time when theDeadLetter.message()was entered in a dead letter queue.- Specified by:
enqueuedAtin interfaceDeadLetter<M extends EventMessage<?>>- Returns:
- The moment in time when the
DeadLetter.message()was entered in a dead letter queue.
-
lastTouched
Deprecated.Description copied from interface:DeadLetterThe moment in time when this letter was last touched. Will equal theDeadLetter.enqueuedAt()value if this letter is enqueued for the first time.- Specified by:
lastTouchedin interfaceDeadLetter<M extends EventMessage<?>>- Returns:
- The moment in time when this letter was last touched.
-
diagnostics
Deprecated.Description copied from interface:DeadLetterThe diagnosticMetaDataconcerning this letter.- Specified by:
diagnosticsin interfaceDeadLetter<M extends EventMessage<?>>- Returns:
- The diagnostic
MetaDataconcerning this letter.
-
getId
Deprecated.The ID of the entity in the database.- Returns:
- The ID of this
JpaDeadLetter.
-
getIndex
Deprecated.The index of the dead letter within its sequence identified by thesequenceIdentifier. Will ensure the events are kept in the original order.- Returns:
- The index of this
JpaDeadLetter.
-
getSequenceIdentifier
Deprecated.The sequence identifier of thisDeadLetter. If letters belong to the same sequence, they should be handled sequentially at all times. This is ensured by thegetIndex()property.- Returns:
- The sequence identifier of this
DeadLetter.
-
markTouched
Deprecated.Description copied from interface:DeadLetterConstruct a copy of thisDeadLetter, replacing theDeadLetter.lastTouched()with the current time.- Specified by:
markTouchedin interfaceDeadLetter<M extends EventMessage<?>>- Returns:
- A copy of this
DeadLetterwithDeadLetter.lastTouched()set to now.
-
withCause
Deprecated.Description copied from interface:DeadLetter- Specified by:
withCausein interfaceDeadLetter<M extends EventMessage<?>>- Parameters:
requeueCause- The new cause of theDeadLetterunder construction.- Returns:
- A copy of this
DeadLetter, replacing theDeadLetter.cause()with the givenrequeueCause.
-
withDiagnostics
Deprecated.Description copied from interface:DeadLetterConstruct a copy of thisDeadLetter, replacing theDeadLetter.diagnostics()with the givendiagnostics.- Specified by:
withDiagnosticsin interfaceDeadLetter<M extends EventMessage<?>>- Parameters:
diagnostics- The diagnosticMetaDatato append to theDeadLetterunder construction.- Returns:
- A copy of this
DeadLetter, replacing theDeadLetter.diagnostics()with the givendiagnostics.
-
toString
Deprecated. -
equals
Deprecated. -
hashCode
public int hashCode()Deprecated.
-
JpaDeadLetterwhich moved to jakarta.