travisjeffery / jocko

Kafka implemented in Golang with built-in coordination (No ZK dep, single binary install, Cloud Native)
https://twitter.com/travisjeffery
MIT License
4.93k stars 363 forks source link

Doesn't work with new sarama #161

Open Serhii1011010 opened 4 years ago

Serhii1011010 commented 4 years ago

Steps to reproduce:

1 clone this repository 2 go to _examples/sarama dir 3 modify it to be up to date 4 go run main.go

everything is fine so far

5 change go.mod's sarama version to, say, v1.26.1 6 get out of memory error

The error is happening here https://github.com/travisjeffery/jocko/blob/master/protocol/decoder.go#L277 because this conversion https://github.com/travisjeffery/jocko/blob/master/protocol/decoder.go#L266 makes n to be 4294967295, which is probably because sarama changed endianness in their protocol.

Serhii1011010 commented 4 years ago

The issue appears in 1.17.0 version of sarama. 1.16.0 still works.