gmrdn / redis-streams-go

A short example of event sourcing with Redis Streams and Go
28 stars 7 forks source link

No handling PEL messages #1

Open Perfeto opened 6 months ago

Perfeto commented 6 months ago

Hello! Thanks for the awesome example!

If you are using NoAck=False, then there can be messages stored in the Pending Entry List (PEL), which can occur when the server is restarting. You need to handle it using XAUTOCLAIM.

https://github.com/gmrdn/redis-streams-go/blob/30a0e3977052b236938c7c821b9eb22a78c357be/consumer/main.go#L41

Perfeto commented 6 months ago

Here example fow to do it - https://gitlab.com/denuly54/awesome_golang/-/blob/master/cmd/redisreplyresponse/root.go?ref_type=heads#L112