commanded / commanded-extreme-adapter

Extreme event store adapter for Commanded
MIT License
12 stars 20 forks source link

Extract subscribe_to_stream function #13

Closed jfornoff closed 5 years ago

jfornoff commented 6 years ago

The only persistent subscription functionality is currently subscribing to all streams. We can allow subscribing to arbitrary streams by extracting a function that takes the stream name as an argument.

So this is just an extract function refactoring :-)

drozzy commented 6 years ago

I suggest you use $streams here instead. Not sure what the "" will actually accomplish...

drozzy commented 6 years ago

In my PR I removed this completely and replaced it with $streams: https://github.com/commanded/commanded-extreme-adapter/pull/17

Not sure what it affects, but I verified that aggregate loading/saving works correctly.

jfornoff commented 6 years ago

This PR is intended to be a refactoring, so I did not change any behavior. @drozzy I'm pretty sure if you do not listen to $all that it probably breaks strong consistency (from what I gather) -- at least if you don't specify which handlers you are specifically waiting for and just set strong_consistency: :true.

drozzy commented 6 years ago

Not sure what you mean by strong consistency. If we assume that one aggregate is one stream - there is no need for inter-aggregate consistency, since aggregate is the only consistency boundary in DDD... Unless I'm misunderstanding something.

jfornoff commented 6 years ago

I mean this. Its not about aggregates, but event handlers.

drozzy commented 6 years ago

Not sure how you can ensure that all event handlers processed an event... What if the event handler is not using commanded, but rather subscribes directly to EventStore, via Extreme or even .NET?

jfornoff commented 6 years ago

It doesn't work if it is not using Commanded, pretty sure.