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

Stopping a pipeline on error #81

Closed
slashdotdash opened this issue May 22, 2019 · 4 comments
Closed

Stopping a pipeline on error #81

slashdotdash opened this issue May 22, 2019 · 4 comments

Comments

@slashdotdash
Copy link

Error handling is described as follows in the Broadway documentation:

In case of failures, Broadway does its best to keep the failures contained and avoid losing messages. The failed message or batch is acknowledged as failed immediately. For every failure, a log report is also emitted.

Assume there's a requirement that we'd like to manually intervene whenever an error is encountered, instead of allowing processing to continue (due to processing being dependent upon strict message order). Would it be possible to stop a pipeline when encountering an error? Could I use the Broadway.Acknowledger behaviour to signal the producer to stop sending any further messages, or is there a better approach?

Additionally, if the messages were being partitioned it would be preferable to only stop messages within the affected partition, and allow other partitions to continue processing.

I'm interested in using Broadway for event handling (in event sourced applications) and currently support three error strategies: retry, skip, and stop. Retrying messages and skipping (nack) can be handled using the existing Broadway consumer API, but I can't see how to stop processing.

@josevalim
Copy link
Member

josevalim commented May 22, 2019 via email

@slashdotdash
Copy link
Author

Thanks for the feedback @josevalim I’ll look into using a custom producer. Initially it will be simpler just to stop all message processing on error (if requested).

@josevalim
Copy link
Member

josevalim commented May 22, 2019

Perfect, if you have any follow up questions, feel free to post them here! Btw, which source will you be consuming data from?

PS: I am closing it though as there is nothing to do in Broadway, but we can continue the convo.

@slashdotdash
Copy link
Author

The messages will be events from Event Store subscriptions (Postgres database).

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