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.
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.