MINOR: Include request header in exception when correlation of request/response fails

Author: Ismael Juma <ismael@juma.me.uk>

Reviewers: Guozhang Wang <wangguoz@gmail.com>

Closes #1793 from ijuma/include-request-header-if-request-correlation-fails
This commit is contained in:
Ismael Juma 2016-08-26 11:12:25 -07:00 committed by Guozhang Wang
parent b4ddd021b4
commit d4c379832b
1 changed files with 1 additions and 1 deletions

View File

@ -484,7 +484,7 @@ public class NetworkClient implements KafkaClient {
private static void correlate(RequestHeader requestHeader, ResponseHeader responseHeader) { private static void correlate(RequestHeader requestHeader, ResponseHeader responseHeader) {
if (requestHeader.correlationId() != responseHeader.correlationId()) if (requestHeader.correlationId() != responseHeader.correlationId())
throw new IllegalStateException("Correlation id for response (" + responseHeader.correlationId() throw new IllegalStateException("Correlation id for response (" + responseHeader.correlationId()
+ ") does not match request (" + requestHeader.correlationId() + ")"); + ") does not match request (" + requestHeader.correlationId() + "), request header: " + requestHeader);
} }
/** /**