Message Bus and CQRS
PHP Message Bus, CQRS, Command Event Query Handlers
Last updated
Was this helpful?
PHP Message Bus, CQRS, Command Event Query Handlers
Works with: Laravel, Symfony, and Standalone PHP
Your service classes mix reading and writing. A single change to how orders are placed breaks the order listing page. Business rules are scattered across controllers, listeners, and services — there's no clear boundary between "what changes state" and "what reads state."
Ecotone introduces Command Handlers for state changes, Query Handlers for reads, and Event Handlers for reactions. Each has a single responsibility, wired automatically through PHP attributes. No base classes, no framework coupling — just clear separation of concerns on top of your existing Laravel or Symfony application.
In this chapter we will cover process of handling and dispatching Messages with Ecotone. We will discuss topics like Commands, Events and Queries, Message Handlers, Message Buses, Aggregates and Sagas. You may be interested in theory - DDD and CQRS chapter first.
Going into CQRS with PHP [Article]
Event Handling in PHP [Article]
Last updated
Was this helpful?
Was this helpful?