Open jinleileiking opened 5 years ago
use tag v0.1.17 ok.
can you confirm that the latest version (eg from master) works with an older version? on my side it's fine, can't tell the broker version though right now
edit: problem might be that kaf does not correctly set the broker version. it's currently hardcoded to some specific version i think. i'll investigate this evening
can you confirm that the latest version (eg from master) works with an older version?
---- Can you elaborate this ?
I change Version
saramaConfig.Version = sarama.V0_10_0_0¬
The log says:
Unable to list topics: kafka server: The version of API is not supported
Seems LIstTopics do not support 0.10.0.0
Okay now i understood, somehow i thought you use kafka version 2.x.x. but it's actually 0.10 and 2.11 is the scala version.
i think it would make sense to add either auto detection of the kafka version (kaf currently hardcodes it to 1.0.0), or making it configurable in the kaf config file.
thanks for digging into this!
Yes. My kafka version is 2.11-0.10.0.0
The following steps are worked for my kafka:
github.com/Shopify/sarama v1.20.2-0.20190215145417-6a7bac87a052
Seems there are significant changes in the sarama lib.
And sarama docs said:
// The version of Kafka that Sarama will assume it is running against.
// Defaults to the oldest supported stable version. Since Kafka provides
// backwards-compatibility, setting it to a version older than you have
// will not break anything, although it may prevent you from using the
// latest features. Setting it to a version greater than you are actually
// running may lead to random breakage.
Version KafkaVersion
In my fork https://github.com/jinleileiking/kaf
Works well. I change the kafka version with latest code. It is very confusing.
this shows to me that there were some changes in sarama that now make your connection fail if the wrong kafka version is set - which is actually good behavior.
so we need to make the version configurable. are you interested in opening a PR for this?
Note that some commands are not available with certain versions - that's why i default to v1.1.0.0. but from your logs i see that sarama will return this error anyway ("the version of this api is not supported").
https://github.com/Shopify/sarama/issues/1431
Seems version should be 11. I do not think my fork is correct. It needs dig the sarama codes to get the truth. I didnot have time for that right now.
same here kafka_2.11-0.10
only work below v0.1.17
but v0.1.17
give error at topics listing
➜ kaf topics
panic: EOF
goroutine 1 [running]:
main.glob..func12(0x18e8920, 0x190c730, 0x0, 0x0)
/home/j0e/gopath/src/github.com/infinimesh/kaf/cmd/kaf/topic.go:59 +0x54e
github.com/infinimesh/kaf/vendor/github.com/spf13/cobra.(*Command).execute(0x18e8920, 0x190c730, 0x0, 0x0, 0x18e8920, 0x190c730)
/home/j0e/gopath/src/github.com/infinimesh/kaf/vendor/github.com/spf13/cobra/command.go:766 +0x2cc
github.com/infinimesh/kaf/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0x18e7880, 0x12, 0x1522e90, 0x17)
/home/j0e/gopath/src/github.com/infinimesh/kaf/vendor/github.com/spf13/cobra/command.go:852 +0x2fd
github.com/infinimesh/kaf/vendor/github.com/spf13/cobra.(*Command).Execute(0x18e7880, 0x0, 0x18e8920)
/home/j0e/gopath/src/github.com/infinimesh/kaf/vendor/github.com/spf13/cobra/command.go:800 +0x2b
main.main()
/home/j0e/gopath/src/github.com/infinimesh/kaf/cmd/kaf/kaf.go:60 +0x2d
kaf version: v0.1.20
kafka version: kafka_2.11-0.10.0.0