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