Saturday, 30 April 2022

Correlation ID vs Causation ID

causation or correlation id? - EventStoreDB - Event Store Discuss Forum

From Greg Young:

The are both really simple patterns I have never quite understood why

they end up so misunderstood.

Let's say every message has 3 ids. 1 is its id. Another is correlation
the last it causation.

The rules are quite simple. If you are responding to a message, you
copy its correlation id as your correlation id, its message id is your
causation id.

This allows you to see an entire conversation (correlation id) or to
see what causes what (causation id).

No comments:

Post a Comment