bakerface / easy-source

From zero to event sourcing
MIT License
5 stars 3 forks source link

event broadcast #6

Open yonahforst opened 7 years ago

yonahforst commented 7 years ago

Where is the right place to hook into command processing in order to broadcast resulting events to other systems?

yonahforst commented 7 years ago

at the moment, i'm return the events in a promise here: https://github.com/yonahforst/easy-source/blob/master/lib/domain/to-class.js#L108 and then broadcasting via SNS in the then

yonahforst commented 7 years ago

Actually, since I'm using dynamoDB for the eventstorage, I'm just going to subscribe to the dynamostream and broadcast events from there.

I'm gonna leave this open since this library does need a way to hook into events and publish them