feat: pub sub (#1341)

* fix: pub sub

* fix: adaot config to commands (and queries)

* remove dependency on vv2 in v1

* fix: pub sub in new eventstore

* fix tests

Co-authored-by: Livio Amstutz <livio.a@gmail.com>
This commit is contained in:
Fabi
2021-02-24 13:24:33 +01:00
committed by GitHub
parent 8dcbbc87ca
commit c0f55e7209
14 changed files with 124 additions and 723 deletions

View File

@@ -38,8 +38,10 @@ func newIAMMember(handler handler) *IAMMember {
func (m *IAMMember) subscribe() {
m.subscription = m.es.Subscribe(m.AggregateTypes()...)
go func() {
for event := range m.subscription.Events {
query.ReduceEvent(m, event)
}
}()