bsm / sarama-cluster

Cluster extensions for Sarama, the Go client library for Apache Kafka 0.9 [DEPRECATED]
MIT License
1.01k stars 222 forks source link

Expose underlying consumer errors #278

Closed pkedy closed 5 years ago

pkedy commented 6 years ago

Tweaked Error to expose the underlying error (as Err) and added Error() string {...} to satisfy the error interface. This would be helpful for reacting to specific error cases (e.g. on sarama.ErrOutOfBrokers connect to a secondary cluster). Currently, you would need to do a string comparison on Error().