diff --git a/kafka/producer/kafka.py b/kafka/producer/kafka.py index 646e77384..b1796b394 100644 --- a/kafka/producer/kafka.py +++ b/kafka/producer/kafka.py @@ -571,11 +571,7 @@ def send(self, topic, value=None, key=None, partition=None, timestamp_ms=None): # handling exceptions and record the errors; # for API exceptions return them in the future, # for other exceptions raise directly - except Errors.KafkaTimeoutError: - raise - except AssertionError: - raise - except Exception as e: + except Errors.BrokerResponseError as e: log.debug("Exception occurred during message send: %s", e) return FutureRecordMetadata( FutureProduceResult(TopicPartition(topic, partition)),