long receivedMessageId = transport.readVLong();
// If received id is 0, it could be that a failure was noted before the
// message id was detected, so don't consider it to a message id error
if (receivedMessageId != params.messageId && receivedMessageId != 0) {
String message = "Invalid message id. Expected %d and received %d";
localLog.invalidMessageId(params.messageId, receivedMessageId);
if (isTrace)
localLog.tracef("Socket dump: %s", hexDump(transport.dumpStream()));
throw new InvalidResponseException(String.format(message, params.messageId, receivedMessageId));
}
localLog.tracef("Received response for message id: %d", receivedMessageId);