-
Notifications
You must be signed in to change notification settings - Fork 76
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
Redis streams kind of replay nacks even when auto_replay_nacks
is false
#84
Comments
Hey. Thanks for opening this issue! I've done a bit of a deep dive here and think see the confusion, and agree that the auto-replaying functionality in the context of a component like a So bento/public/service/input_auto_retry_batched.go Lines 27 to 33 in 17147d6
Fundamentally, however, a redis stream requires that messages be acknowledged (via an On the Redis stream side, an From the Redis streams docs:
Now back to your original problem. You're correct in saying that when downstream messages from a If you do not want these messages to be re-queued, you'll want to There are a couple of ways to do this so I'd recommend giving a look at the Error Handling
Let me know if this makes sense. Otherwise, I'm happy to also chat on the Discord if it's easier 😄 |
Thanks @gregfurman for the explanation. so I guess by |
I have a simple bento application which reads data from a Redis stream and put the data into a SQL db. I want to make sure that if for some reasons a record faced an error while trying to put the data into db, the record stays not acknowledged on Redis streams so I can easily rerun the application after I fixed the issue with the SQL insertion.
As far as I understand by default if there is an error in the
output
no acknowledgement will take place, however the record causing the error will keep replaying the whole pipeline. To avoid this, there is a parameter calledauto_replay_nacks
that could help me.Based on my understanding, if I give value
false
toauto_replay_nacks
I expect no failed record repeating the pipeline and also the failed record being not acknowledged. However, when I'm testing the scenario, the failed record keeps repeating the whole pipeline regardless of the value of parameterauto_replay_nacks
.As I went through the code, I found out that when the parameter
auto_replay_nacks
isfalse
this part of the code is adding the failed record to thependingMsgs
, so the failed record repeats forever.bento/internal/impl/redis/input_streams.go
Line 407 in 17147d6
I'm not sure if my expectation from
auto_replay_nacks
is valid or not. I would appreciate it if you kindly let me know how I can avoid the repeating in this scenario.For replicating the case you could use a simple
input-output
configuration, for which you have a record that fails in theoutput
section.The text was updated successfully, but these errors were encountered: