commanded / eventstore

Event store using PostgreSQL for persistence
MIT License
1.06k stars 146 forks source link

Allow an `event_id` to be provided when appending events #227

Closed slashdotdash closed 3 years ago

slashdotdash commented 4 years ago

Add event_id to the EventStore.EventData struct and use it as the event's id unless it is nil (default to UUID.uuid4()).

This allows idempotency when appending events (don't append the same event twice) as the event store guarantees that event ids are unique.

slashdotdash commented 3 years ago

Done in #229.