You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed that we are using a very simple case statement to enforce the behaviour of the PullConsumer which means that if a user ever implements a function that has an unexpected return value it will crash their PullConsumer without sending back a NACK or any other indication to the jetstream server.
I think this type of thing could happen pretty easily by using a with statement in user code.
This seems like something we should handle by logging an error and potentially returning a NACK to jetstream, but we probably shouldn't just crash the whole PullConsumer?
The text was updated successfully, but these errors were encountered:
Returning something unexpected is a programmer error, and personally I would throw tantrums from our code in such case because it's contract violation.
I do agree that raising a more meaningful exception is a good thing here to do.
I am not sure if we should send NACK back because:
a stream may be configured in NoAck mode for example
not sending anything is also a Jetstream-recognizable behaviour (as far as I know, I may be wrong) and it means that consumer encountered an internal error -- which is exactly the thing that happens here
I noticed that we are using a very simple
case
statement to enforce the behaviour of thePullConsumer
which means that if a user ever implements a function that has an unexpected return value it will crash theirPullConsumer
without sending back a NACK or any other indication to the jetstream server.I think this type of thing could happen pretty easily by using a
with
statement in user code.This seems like something we should handle by logging an error and potentially returning a NACK to jetstream, but we probably shouldn't just crash the whole
PullConsumer
?The text was updated successfully, but these errors were encountered: