insufficient data to decode packet, more bytes expected

967 views
Skip to first unread message

Luis Sanchez

unread,
Aug 24, 2017, 2:02:50 AM8/24/17
to kafka-clients
Ive been using sarama to talk to Kafka 0.9.0.1. I'm trying to move to kafka 0.10.1.0, but my unit tests (using sarama.MockBroker) now give me the following error after changing the kafka version to sarama.V0_10_1_0 in my client code:

[sarama] 2017/08/24 00:51:38 *** mockbroker/0/9: connection opened

[sarama] 2017/08/24 00:51:38 Connected to broker at 127.0.0.1:51069 (registered as #0)

[sarama] 2017/08/24 00:51:38 *** mockbroker/0/9: served &{8 test 0xc420326d80} -> &{map[testchain.start.channel:map[0:0xc4203213b0]] 0 0s}

[sarama] 2017/08/24 00:51:38 producer/broker/0 state change to [closing] because kafka: insufficient data to decode packet, more bytes expected


I've been trying to debug, and I've traced the error so far to:

called from:


It seems to be expecting a timestamp field in the ProduceResponse that is being decoded, since the message version is now ?=2.

Is there a way of having the MockBroker fill in the timestamp? or can someone point me to how I can make my NewMockProducerResponse() have the timestamp field set?

Thanks.

Luis Sanchez

unread,
Aug 24, 2017, 2:04:51 AM8/24/17
to kafka-clients
Sorry, I forgot to explicitly mention that I'm using the sarama golang kafka client (v1.12.0). 

Luis Sanchez

unread,
Aug 31, 2017, 11:15:17 AM8/31/17
to kafka-clients
Reply all
Reply to author
Forward
0 new messages