reafctoring + exception handling for kafka producer + logging