code: def acked(err, msg):
      
      if err is not None:
          print("failed to deliver message: {}".format(err.str()))
      else:
          print("produced to: {} [{}] @ {}".format(msg.topic(), msg.partition(), msg.offset()))
docs: Delivery report callback called (from flush()) on successful or failed delivery of the message.