How-to guide

Payload formats & envelopes

Control exactly what your receiver gets — the raw bytes, normalized JSON, or a structured envelope — how much of the body Queuey stores, and whether to transform the payload on the way out.

Outbound format

FormatWhat the receiver gets
RawForward the original body bytes unchanged — best for signature passthrough (e.g. provider webhooks your receiver already verifies).
JsonNormalizedParse and re-serialize the JSON — stable, canonical formatting for receivers that care about shape.
EnvelopedWrap the payload in an envelope with metadata (event id, type, timestamps).

Envelopes & CloudEvents

When you envelope a payload, pick the envelope kind: Queuey's own QueueyV1, or CloudEventsV1 for receivers that speak the CloudEvents spec. The original payload becomes the envelope's data, with event id, type, and timestamps alongside.

Body storage

Choose how much Queuey retains: Always (full audit + easy replay), OnFailure (store only when a delivery fails — the default balance), or Never (minimal retention for sensitive data). You can also cap body size with maxBytes.

Transform on the way out

Apply RFC 6902 JSON Patch mutations to reshape the outbound payload — add a field, strip an internal one — without touching the producer:

JSON Patch mutation
[
  { "op": "add",    "path": "/source", "value": "queuey" },
  { "op": "remove", "path": "/internalNote" }
]
Raw + passthrough keeps signatures valid
For provider webhooks your receiver already verifies (signature over the raw body), use Raw outbound format and avoid mutations — so the bytes (and the signature) survive untouched.

Related