TransactionEventStore
An extension of https://github.com/arkency/ruby_event_store with support for pessimistic locking and snapshots.
Implementations
- Mongoid
- Active Record coming soon
See Also
Snapshot Aggregate Root an "Aggregate Root" implementation using this event store.
API
Same as RubyEventStore::Client except the following additions
Snapshots
-
publish_snapshot- delegates torepository#create_snapshot -
last_stream_snapshot- delegates torepository#last_stream_snapshot
Concurrent writers
-
with_lockmethod added, which delegates torepository#with_lock -
notify_susbsribersmethod added, which exposes the exisingevent_broker#notify_subscribersfunction (this is usedwith_write_contextto ensure event handlers aren't called until after the events are committed)
Unlimited queries
- Event store reader methods (
read_events_forwardetc), that accept acount:parameter can be passedcount: nilto disable limits