Introduction

The Symfony adapter plugs BabelQueue into Symfony Messenger. You keep Messenger’s transports, handlers, worker and retry — BabelQueue only changes the wire format to the canonical, language-agnostic envelope, so your Symfony services exchange messages with Laravel, Go, Python, Java, .NET and Node over one strict JSON format, on the broker you already run.

It is a thin adapter built on the shared core (babelqueue/php-sdk), which owns the one codec and contract.

What you get

  • Messenger serializer. A drop-in SerializerInterface (babelqueue.messenger.serializer) that encodes/decodes the canonical envelope (schema_version: 1) on any Messenger transport — AMQP/RabbitMQ, Redis, and more.
  • PolyglotMessage contract. Mark a message class with its URN and a pure-array payload; everything else stays idiomatic Messenger.
  • URN routing on consume. Inbound envelopes are mapped from their URN back to your message class via a small registry.
  • Retry bridge. Messenger’s RedeliveryStamp ⇄ the envelope’s top-level attempts, in both directions.
  • Automatic trace_id propagation. A middleware forwards the inbound trace_id onto any message a handler dispatches, so a chain of work stays in one trace.

The envelope

{
  "job": "urn:babel:orders:created",
  "trace_id": "7b3f9c2a-e41d-4f88-9b2a-1c0d5e6f7a8b",
  "data": { "order_id": 1042 },
  "meta": { "id": "f1e2d3c4-b5a6-4789-90ab-cdef01234567", "queue": "orders", "lang": "php", "schema_version": 1, "created_at": 1749132727000 },
  "attempts": 0
}

See the full wire contract. Continue to Installation.