-
Notifications
You must be signed in to change notification settings - Fork 14
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
Acking a by-category stream, doesn' seem to work #37
Comments
ah another nice find! Thanks for trying out spear and finding all my embarrassing bugs 😁 I suspect that this is just like the other problem: the link data that we would need to acknowledge events is probably currently discarded. In this case instead of the I'm sure that there's a way that isn't too messy to fix this in the current code-base but I think it's probably wiser for me to bite the bullet of the refactor in #36 (and ideally some real testing in #35) before/during tackling this problem. Right now links are a bit of an after-thought and I'd like to change that. The day is just getting started here in the CDT timezone, I'll have this fixed in a jiffy! |
Ok so it looks like the v0.9.0 is a bit of a breaking change if you're depending on # before
def revision(%Spear.Event{metadata: %{link: %{stream_revision: revision}}}), do: revision
def revision(%Spear.Event{metadata: %{stream_revision: revision}}), do: revision
# after
def revision(%Spear.Event{link: %Spear.Event{} = link}), do: revision(link)
def revision(%Spear.Event{metadata: %{stream_revision: revision}}), do: revision Also if you're looking into using persistent subscriptions, be sure to check out Broadway. It's has a really nice Acknowledger behaviour that fits well with the persistent subscription ack/nack/park system. We recently built a producer for regular and persistent subscriptions. Our producers are a bit experimental and surely has some bugs to iron out but they makes writing event-handling topologies really slick (here's an example handler). Thanks again for reporting, glad to have you trying out the library! 🙂 |
It is my pleasure! And thanks for being so responsive (and insanely productive). I really liked the thorough explanation. I figured it had to be something regarding resolved id's but I became lost trying to figure out how to fix it 🙈 |
Hey again, I will try to contribute by finding the error myself, but I can post it here in the mean time.
It seems that acking on a persistent subscription on a by-category stream is not working.
:ok = Spear.ack(JaaApiLive.EventStoreDbClient, sub, msg)
evaluates fine, but the event is sent over and over.
My guess is that it is somehow related to the event being a link as it is a projection stream.
The text was updated successfully, but these errors were encountered: