Browse Source

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
pull/1782/merge
Ismael Juma 8 years ago committed by Guozhang Wang
parent
commit
d4c379832b
  1. 2
      clients/src/main/java/org/apache/kafka/clients/NetworkClient.java

2
clients/src/main/java/org/apache/kafka/clients/NetworkClient.java

@ -484,7 +484,7 @@ public class NetworkClient implements KafkaClient { @@ -484,7 +484,7 @@ public class NetworkClient implements KafkaClient {
private static void correlate(RequestHeader requestHeader, ResponseHeader responseHeader) {
if (requestHeader.correlationId() != 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);
}
/**

Loading…
Cancel
Save