Skip to content
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

Handle Raises or Process Exits #40

Open
mmmries opened this issue Mar 26, 2022 · 1 comment
Open

Handle Raises or Process Exits #40

mmmries opened this issue Mar 26, 2022 · 1 comment

Comments

@mmmries
Copy link
Owner

mmmries commented Mar 26, 2022

Similar to #39 I think we want to help user code deal with unexpected errors being raised or process exits. This can often come from things like a statement timeout from Ecto, or trying to call a process that has crashed etc. These situations are often things that will self-correct in a well functioning BEAM application. So sending a NACK (or maybe letting the message timeout?) makes sense, rather than crashing the whole consumer.

@mkaput
Copy link
Collaborator

mkaput commented Mar 29, 2022

Hmm, I would definitely not send NACK and just let the message timeout here. This is the existing behaviour.

Mind that PullConsumer is modelled after GenServer and there, raising within callback will crash the process. This would work well with process state, so you could recover from invalid state cases by restarting the consumer with new, clean one.

So I would personally not do anything here. What do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants