ReplayHeaders

com.worxbend.cobalt.ReplayHeaders
object ReplayHeaders

The replay markers this build adds to a republished record.

Neither name carries the ce_ prefix, and that is load-bearing. A ce_-prefixed header is a CloudEvents context attribute under the Kafka binding, so spelling these ce_replayattempt would change the event: a different extension set, a different raw jsonb, a different row. As plain transport headers they are invisible to the decoder and to everything downstream of it, which is exactly what "indistinguishable from the original" needs.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def attemptsOf(headers: Map[String, String]): Either[String, Int]

How many replays the recorded headers say this record has survived.

How many replays the recorded headers say this record has survived.

A Left — a header present but not a non-negative integer — is read by the planner as budget exhausted, not as zero. Nothing in this build writes anything else there, so an unparseable value means something outside it did, and the conservative reading of "I cannot tell how many times this has gone round" is "do not send it round again".

Attributes

Concrete fields

val Attempt: String

How many times this record has been replayed. Absent means never.

How many times this record has been replayed. Absent means never.

Attributes

val Of: String

The DLQ key of the dead letter this record was rebuilt from — the previous generation's origin coordinates.

The DLQ key of the dead letter this record was rebuilt from — the previous generation's origin coordinates.

Together with Attempt this turns a poison loop into a readable chain rather than a pile of unrelated dead letters: each generation names its predecessor, so "this event has been going round for three days" is one field instead of a correlation exercise.

Attributes