We should document how to do this: https://stackoverflow.com/questions/46388116/how-to-add-a-failure-callback-for-kafka-python-kafka-kafkaproducersend If my answer is amiss at all, please feel free to correct it.