From this discussion Alexey Zimarev mentioned that you should have integration events with a time to live (TTL). Are message broker necessary at all when using EventStoreDB?
If I introduce a TTL in the integration events then I have the problem that new sytems can not subscribe to these and read/consume from the beginning.
The way I wanted to differentiate domain events from integration events is to add “integration event” to the metadata and have these published on a different stream than domain events. Each integration event would have its own stream.
Another trade-off that I have identified with this approach is that I will have to carefully think about my versioning strategy on integration events whenever making changes.
Is this a valid approach or is there anything I am missing?
Each integration event would have its own stream.
you mean 1 stream per event or 1 stream per integration event type ?
Integration events are typically in EDA ( not event sourced) used for “now only” integration.
Now , it is super good practice to seperate events used from the application perspective to events ( messages really) sent accros application / system boundaries .
( I’ll use message instead of integration events , just to make the difference clear)
With ESDB, at the source of the system data, you don’t necessarely need to keep those messages in streams .
You can have a catch-up subcriptions creating those messages and sending them to downstream systems.
When a new downstream system appears, just have a new subscription that will start from wherever you need ( start / end / some point in time ) and let it run until it catches up.