Producer problems with Kafka 0.9.0.0
hello @nmred , 最近在使用kafka-php的时候遇到了点问题,我本地环境的kafka-server是2.10-0.9.0.0。 在使用lib中的producer时设置了brokerVersion=0.9.0.0;但是发现没法正常地发送消息,消费者获取不到消息,而且topic也没办法正常使用了(写花了的感觉)。
后来试验发现,必须使用0.10.*版本(Version2打包协议)才能正常的发送消息,消费者也能正常消费,但是由于server是0.9.0.0,所以ack模式下,unpack又出现问题。
手动修改了lib代码,发现发送时使用Version2(0.10.*),unpack时使用Version1(0.9.*)才既能正常生产,又能正常解包。 很是奇怪,之前又没有人问过相关的issue,又不确定是不是lib出现的问题,还是本地kafka-server的问题。 特来请教一下,是lib使用方式的不对,还是别的什么问题?
谢谢~
@txl1290 I've translated your text (using google translator so it might not be accurate) to make it easier for everyone to understand what you're saying, please modify if you need to clarify things.
On #147 I've added functional tests to assert that both producer and consumer work fine with a real Kafka (0.9+) server and everything seems to be working fine. Can you please check the tests to ensure you're using the library correctly and/or add more details here so that we know what's going on?
这个也困惑了我很久。最后发现Consumer使用0.9.0.1版本,Producer使用0.10.2.1版本才正常。