Microservices in PHP

Send commands and publish events between PHP services through the brokers you already operate. #[Distributed] handlers, Distributed Bus + Service Map for multi-broker topology, MessagePublisher for outbound integration — transport-agnostic, no custom glue per service pair.

Composer package · Laravel or Symfony · PostgreSQL or MySQL · RabbitMQ, Kafka, SQS, Redis, or DBAL outbox

How it compares

PHP alternatives for this category

Each row names what you'd need to add to match Ecotone, and the architectural ceiling that integration cannot fix.

Symfony Messenger alone

Transports point at each other. No shared topology. Single-tenant.

  • Cross-service messaging via configuring transports that point at each other's queues — there is no shared service-topology declaration.
  • Routing logic spreads across YAML config, middleware classes, and service-tag wiring per service pair.
  • The receiving side dispatches one envelope through all matching handlers — a failing handler triggers sibling re-runs on retry.
  • Multi-tenant per service: officially single-tenant per application.
  • No idempotency contract; no outbox primitive integrated with cross-service publication.
Laravel Queues / Horizon

Queue connections aren't a service topology. Per-pair custom code.

  • Queue connections are transport endpoints (Redis, SQS, DB, Beanstalkd) — not a topology of which service consumes which routing keys on which broker.
  • Cross-service routing, idempotency, outbox, and bounded-context isolation become per-service custom code.
  • Horizon is Redis-only.
Ecotone

Cross-service messaging that inherits every guarantee your in-process messaging already has.

  • `#[Distributed]` handlers and the Distributed Bus turn any PHP service into a messaging participant on the brokers you already operate.
  • The Service Map carries the topology — which service consumes which routing keys on which broker — so adding a service is a config change, not code in every caller.
  • Every primitive that protects in-process messages applies uniformly across service boundaries: per-handler failure isolation, retry policies, DBAL dead-letter, idempotency, OpenTelemetry, automatic correlation/causation.
  • Multi-broker single-topology is first-class: some services on Kafka, others on RabbitMQ, others on SQS, all coordinated through one Service Map.
  • Replaces the per-pair retry-and-serialization glue that grows linearly with service count.

Frequently asked questions

Haven’t found what you’re looking for? Contact us

Distributed Bus moves commands and events between PHP services through the brokers you already operate (RabbitMQ, Kafka, SQS, Redis) with guaranteed delivery, retry, and dead-letter built in. REST and gRPC are synchronous request/response — when Service B is down, Service A fails too unless you build your own retry, queue, and outbox layer. The Distributed Bus inverts that: messages persist in your broker, services consume at their own pace, and the same retry / DLQ / idempotency / outbox primitives Ecotone provides for in-process messages apply uniformly across service boundaries.
Yes. The Service Map carries the topology — which service consumes which routing keys, on which broker. Some services run on Kafka, others on RabbitMQ, others on SQS — all coordinated through one Service Map. Switching a service's broker is a Service Map change, not a code change in every service that calls it.
Messages persist in the broker until the target consumer is back. The Ecotone retry policy on the consumer side handles transient failures with exponential backoff, the DBAL dead-letter queue holds messages that exhaust retries for inspection and replay, and idempotency (#[Deduplicated]) means a redelivered message after recovery doesn't produce a duplicate side effect.
Not for service-to-service messaging on brokers you already operate. Ecotone's Distributed Bus + Service Map handle the cross-service routing, retry, serialization, and topology decisions that a service mesh would coordinate in a polyglot HTTP-based environment. Service meshes (Istio, Linkerd) and API gateways add value when you're routing HTTP between many language runtimes; for PHP-on-PHP service messaging through your existing brokers, they're extra infrastructure without clear benefit.

Be part of the change with EcotoneCurve

Unleash the power of Messaging in PHP
and push productivity to the higher level

Get started
Gradient
Shapes 1
Shapes 2
DiscordTwitterSupport and ContactTelegram