final int flag = MessageFlagUtils.getFlag(message);
final byte[] encodedData = MessageUtils.encodePayload(message);
final PutCommand putCommand =
new PutCommand(topic, partition.getPartition(), encodedData, flag, CheckSum.crc32(encodedData),
this.getTransactionId(), OpaqueGenerator.getNextOpaque());
this.remotingClient.sendToGroup(serverUrl, putCommand, new SingleRequestCallBackListener() {
@Override
public void onResponse(final ResponseCommand responseCommand, final Connection conn) {
final SendResult rt =
SimpleMessageProducer.this.genSendResult(message, partition, serverUrl,
(BooleanCommand) responseCommand);