If Partitioner.Partition() function returns an error, the circuit breaker breaks the circuit and drops some of the subsequent messages. I think Sarama should only drop the message for which partitioner returned an error and send that error to the application through the error channel.
In our application with a custom partitioner, we want to drop the messages that get produced with an invalid key, in which case the expected behavior is to drop only that message but to continue processing the other messages as usual, without a circuit break.
If Partitioner.Partition() function returns an error, the circuit breaker breaks the circuit and drops some of the subsequent messages. I think Sarama should only drop the message for which partitioner returned an error and send that error to the application through the error channel.
In our application with a custom partitioner, we want to drop the messages that get produced with an invalid key, in which case the expected behavior is to drop only that message but to continue processing the other messages as usual, without a circuit break.