Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
0.10.1.0
-
None
-
None
-
None
Description
If you try run an 0.9 producer against 0.8.2.2 kafka broker, you get a fairly cryptic error message:
[2015-11-04 18:55:43,583] ERROR Uncaught error in kafka producer I/O thread: (org.apache.kafka.clients.producer.internals.Sender)
org.apache.kafka.common.protocol.types.SchemaException: Error reading field 'throttle_time_ms': java.nio.BufferUnderflowException
at org.apache.kafka.common.protocol.types.Schema.read(Schema.java:71)
at org.apache.kafka.clients.NetworkClient.handleCompletedReceives(NetworkClient.java:462)
at org.apache.kafka.clients.NetworkClient.poll(NetworkClient.java:279)
at org.apache.kafka.clients.producer.internals.Sender.run(Sender.java:216)
at org.apache.kafka.clients.producer.internals.Sender.run(Sender.java:141)
Although we shouldn't expect an 0.9 producer to work against an 0.8.X broker since the protocol version has been increased, perhaps the error could be clearer.
The cause seems to be that in Sender.java, handleProduceResponse does not to have any mechanism for checking the protocol version of the received produce response - it just calls a constructor which blindly tries to grab the throttle time field which in this case fails.
Attachments
Issue Links
- is related to
-
KAFKA-2756 Replication Broken between Kafka 0.8.2.1 and 0.9 - NetworkClient.java uses wrong protocol version
- Resolved