Package com.babelqueue.outbox
Interface OutboxTransport
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
The minimal publish-only broker seam the
OutboxRelay forwards through — publish one
already-encoded envelope onto a queue. It is the byte-typed counterpart of the core's existing
transport surfaces (Redrive.Transport.publish(queue, body) and the otel.Sender):
the core is codec-only, so an adapter implements this over its broker
(babelqueue-java-sqs, babelqueue-java-redis, babelqueue-spring, or a
plain client).
The relay hands this method the stored bytes verbatim — the exact
EnvelopeCodec.encode(com.babelqueue.Envelope) output that Outbox.write(com.babelqueue.Envelope) persisted (GR-1):
the body is never decoded, rebuilt or re-encoded, so trace_id survives end-to-end (GR-4)
and the bytes that reach the broker are byte-identical to what was stored (GR-5). It is a
single-method FunctionalInterface so a caller can supply a lambda over their own client.
-
Method Summary
-
Method Details
-
publish
Publish a raw, already-encoded (UTF-8 JSON) envelope onto a queue. Thebodyis the verbatim bytes the outbox stored; do not decode or mutate them.- Parameters:
queue- the logical queue to publish tobody- the frozen, encoded envelope bytes, byte-for-byte as stored- Throws:
Exception- to signal a failed publish; the relay catches it, records it viaOutboxStore.markFailed(String, String)and leaves the row pending
-