Message that notifies subscribers about changes in the internal state. Contrary to event notifications, ECST message includes all the data of the changed state.

May include complete snapshot:

{
    "type": "customer-updated",
    "event-id": "6b7ce6c6-8587-4e4f-924a-cec028000ce6",
    "customer-id": "01b18d56-b79a-4873-ac99-3d9f767dbe61",
    "timestamp": 1615728520,
    "payload": {
        "first-name": "Carolyn",
        "last-name": "Hayes",
        "phone": "555-1022",
        "status": "follow-up-set",
        "follow-up-date": "2021/05/08",
        "birthday": "1982/04/05",
        "version": 7
    }
}

or, if the system has large data structures, only modified fields may be included:

{
    "type": "customer-updated",
    "event-id": "6b7ce6c6-8587-4e4f-924a-cec028000ce6",
    "customer-id": "01b18d56-b79a-4873-ac99-3d9f767dbe61",
    "timestamp": 1615728520,
    "payload": {
        "status": "follow-up-set",
        "follow-up-date": "2021/05/10",
        "version": 8
    }
}

Because an ECST message provides sufficient information, conceptually ECST is an asynchronous data replication mechanism. It allows consumers to hold local cache of the system state and work with it (improves performance and fault tolerance).

Useful for Backend for frontend pattern.

See also