Class DeadLetters

java.lang.Object
com.babelqueue.DeadLetters

public final class DeadLetters extends Object
Builds the additive dead_letter block for an Envelope.
See Also:
  • Method Details

    • annotate

      public static Envelope annotate(Envelope envelope, String reason, String originalQueue)
      Annotate using the envelope's current attempts and no error detail.
    • annotate

      public static Envelope annotate(Envelope envelope, String reason, String originalQueue, int attempts, String error, String exception)
      Return a copy of the envelope with a DeadLetter block attached, recording why and where it failed. The original envelope is preserved unchanged inside the result (records are immutable), so any-language consumers can still read it.