go-rabbitmq icon indicating copy to clipboard operation
go-rabbitmq copied to clipboard

Return an error instead of crashing when we cannot retry consumer

Open hugowetterberg opened this issue 7 months ago • 1 comments

This change separates the creation and running of the consumer to allow the caller to handle errors when it's not possible to retry.

A library should never call log.Fatal or os.Exit as this takes control over error handling and graceful termination away from the application developer. The Fatalf() logger method should be removed, but I didn't want to touch the producer parts as I'm not as familiar with them.

hugowetterberg avatar Nov 20 '23 14:11 hugowetterberg