envato / event_sourcery

A library for building event sourced applications in Ruby
MIT License
84 stars 10 forks source link

Add option to stop processor when error is raised #79

Closed jiexinhuang closed 7 years ago

jiexinhuang commented 7 years ago

Instead of retry processing, sometimes we would like to stop the processing pipeline in case of failure. This PR adds a options to ESPRunner so event processor can die when a exception is raised.

Note

As it is a option with default value, this change should not break current public interface.

stevehodgkiss commented 7 years ago

Would an exponential retry backoff be more appropriate? Or a configurable x number of failures until giving up (to account for transient failures)?

jiexinhuang commented 7 years ago

@stevehodgkiss I love that idea, but it will also change current behaviour. Sounds like a feature to add for the next major version! 😄