java.lang.Object
io.axoniq.framework.messaging.eventhandling.deadletter.jpa.JpaDeadLetter<M>
Type Parameters:
M - The EventMessage type of the contained message.
All Implemented Interfaces:
DeadLetter<M>

public class JpaDeadLetter<M extends EventMessage> extends Object implements DeadLetter<M>
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 Details

    • JpaDeadLetter

      public JpaDeadLetter(DeadLetterEntry entry, Metadata diagnostics, M message, Context context)
      Constructs a new JpaDeadLetter from a DeadLetterEntry, deserialized diagnostics and a reconstructed message entry containing both the message and its associated context.

      The context contains restored resources such as tracking token and domain info (aggregate identifier, type, sequence number) that were stored when the dead letter was enqueued.

      Parameters:
      entry - The DeadLetterEntry to construct this letter from.
      diagnostics - The deserialized diagnostics Metadata.
      message - The message that was enqueued.
      context - The context containing restored resources such as tracking token and aggregate data.
  • Method Details