flipp-oss / deimos

Framework to work with Kafka, Avro and ActiveRecord
Other
59 stars 22 forks source link

Introduce concept of "fatal errors" #25

Closed dorner closed 4 years ago

dorner commented 4 years ago

Allow on a global or per-consumer level the ability to define an error as a "fatal error" and reraise it even if config.reraise_errors is set to false.

We can provide a block in the configuration and a method to override in the consumer which would be passed the exception object and the payloads.

For example, the global block could check to see if the database is down (via connection.active?) and reraise the error if so. This would prevent consumers from consuming messages nonstop when a critical resource is missing.

dorner commented 4 years ago

Closed with #27 .