--- title: "Configuration" description: "Configuration — Java BabelQueue SDK (1.x)." source: https://babelqueue.com/docs/babelqueue-java/1.x/configuration/ updated: 2026-06-06T00:00:00.000Z --- # Configuration The core is a codec, so there's almost nothing to configure — the "wiring" is your own broker client plus a couple of optional behaviours. ## Envelope options `EnvelopeCodec.make` takes the queue name (written to `meta.queue`) and an optional inbound trace id to continue across a hop (pass `null` to mint a fresh one): ```java import com.babelqueue.*; import java.util.Map; Envelope env = EnvelopeCodec.make( "urn:babel:orders:created", Map.of("order_id", 1042L), "orders", null); // or inbound.traceId() to continue a trace ``` ## Dead-letter On failure, wrap the envelope in an additive `dead_letter` block and publish the copy to your dead-letter queue (e.g. `orders.dlq`): ```java Envelope dlq = DeadLetters.annotate(env, "failed", "orders", 3, "boom", "java.lang.RuntimeException"); // publish EnvelopeCodec.encode(dlq) to the "orders.dlq" queue ``` `DeadLetters.annotate` returns a copy — the original envelope is preserved unchanged inside the dead-lettered message, so any-language consumer can still read it. ## Unknown-URN strategy For adapters routing inbound messages, `UnknownUrnStrategy` (`FAIL`, `DELETE`, `RELEASE`, `DEAD_LETTER`) describes what to do with a URN you don't handle. Next: [Producing messages](/docs/babelqueue-java/1.x/producing-messages/).