From d4c379832b525d1a9c20c5cb84f0e586b9d977e0 Mon Sep 17 00:00:00 2001 From: Ismael Juma Date: Fri, 26 Aug 2016 11:12:25 -0700 Subject: [PATCH] MINOR: Include request header in exception when correlation of request/response fails Author: Ismael Juma Reviewers: Guozhang Wang Closes #1793 from ijuma/include-request-header-if-request-correlation-fails --- .../src/main/java/org/apache/kafka/clients/NetworkClient.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clients/src/main/java/org/apache/kafka/clients/NetworkClient.java b/clients/src/main/java/org/apache/kafka/clients/NetworkClient.java index b134631bd8b..bd54a29ea9a 100644 --- a/clients/src/main/java/org/apache/kafka/clients/NetworkClient.java +++ b/clients/src/main/java/org/apache/kafka/clients/NetworkClient.java @@ -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); } /**