-
Notifications
You must be signed in to change notification settings - Fork 125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide to(event_id)
for reading events
#528
Comments
until(event_id)
for reading eventsto(event_id)
for reading events
Could you elaborate on those cases? |
Yes. Of course 👍 In my case:
Let's say I want to send an email once when something happens. Also historically. To do that; I would
When the replay is done, I start the consumer on RabbitMQ, and let it catch up, sending mails for whatever might have happened since the consumer was taken down. Now I have handled all historical events, and I'm up to date, and haven't missed a mail. |
a) don't you need idempotency in the event handler? I am not saying we don't need |
Thanks for sharing your knowledge @paneq . Having an idempotent event handler would probably remove the need for both But as you indicated, it's probably not the responsibility of this gem to mandate how you implement your event handlers. Idempotency is nice, but it's also more complex. And you might get similar and sufficient guaranties from other layers of your setup (RabbitMQ in our case). IMHO this gem is about storing and reading events, and having a |
I've seen one of such cases recently, replaying events from given range for handlers that did not execute (failure mode). Without |
That seems to be consistent with |
Looking forward to merge it when ready :) |
In some cases, when replaying events, it's useful to replay until a certain event.
There already is the
from(start)
but I would also like to be able to sayto(stop)
.I would propose that the event used as the stop condition is not read.
I will be submitting a PR for this, but just wanted to air the thoughts here before starting working on it.
The text was updated successfully, but these errors were encountered: