Replies: 3 comments
-
The downside of reading from multiple streams would be inability to order by position in a stream. Streams might follow different strategies regarding position. By reading from multiple we'd have to order by auto-incremented id only, like we do for reading when no stream in specified. I'm curious about your use case and — can you tell a bit more? |
Beta Was this translation helpful? Give feedback.
-
Thanks for replying @pawelpacana , sorry I didn't notice this until a bit later. Yea was just wondering if there was a built in way, no desire for any changes. I don't mind just fiddling with it to fit my specific use case. My use case is using this as a sort of activity stream. We have an activity stream for individual people but would also like an activity stream for admins that can can see different people streams that they manage. As admin <- people streams are dynamic, linking didn't seem to make sense. I monkey patched it by adding another stream type called MultipleStreams. Ordering by created_at is ideally what I prefer, not using it for event sourcing. Another snag i'm tackling in the future is to import old events to be ordered in the correct positions, im assuming thats not possible out of the box nor fits with the intent of this library 😅 Thanks again |
Beta Was this translation helpful? Give feedback.
-
I often forget that we have projection that can read selected events from multiple streams. If you reduce those streams into an array sorted by event timestamps (or any better data structure) then it might be what you're looking for — a dynamic stream. |
Beta Was this translation helpful? Give feedback.
-
Not sure if this a common thing, but is there a defined way to read from multiple streams? I couldn't find anything about it. I've monkey patched it for
.stream
to take in multiple streams and seems like it works like i expect.Curious if theres any downside to this or if its just not a common need.
Beta Was this translation helpful? Give feedback.
All reactions