#65921·symfony

[RFC][Messenger] Durable, versioned process managers on top of Messenger

Author: nicolas-grekasCreated Sep 8, 2026Updated Sep 23, 2026
LabelsRFCMessenger

Description

Proposed by @ben-challis in https://github.com/symfony/symfony/issues/50462#issuecomment-5591424099. Ecotone's Sagas by @dgafka are the reference implementation in the PHP ecosystem, and Lendable runs an in-house one in production. Opened as an RFC to collect requirements; it may well end up closed if this is better left outside the framework.

The need. A business process that spans several messages over time: it keeps state, waits for several independent events, reacts to timeouts, and continues across restarts and deployments. A loan application waiting for a verification and a scoring, an order that expires when it is not paid within a day. Today each step is a handler, the state lives in the application's own entities, timeouts go through the Scheduler by hand, and nothing correlates an incoming event with the process instance it belongs to. The Workflow component models the transitions of one object in memory; it does not persist a process, correlate events to instances, or wait.

What such a component would carry.

  • Persisted process state with optimistic locking, since two events of one process can arrive on two workers at once.
  • Correlation: finding the process instance an incoming message belongs to, from a stamp or from the message itself.
  • Timeouts, expressed as messages scheduled into the future and delivered back to the instance.
  • Versioning: a revision on the process definition, so that running instances finish on the implementation they started with while new instances use the new one.
  • An audit history of what the process received and decided.

Prerequisites. Message identity and correlation (#65899), the inbox (#65918) so that a redelivered event does not advance a process twice, and the Scheduler for timeouts. It would be a component on top of Messenger, not part of it.

Why an RFC. The scope is large, the design space is well explored elsewhere, and this is the heart of what Ecotone provides on top of Messenger. The questions are whether the framework should provide a minimal one, where its boundary is, and who would carry it.

Example

No response