Node-rdkafka: Call producer's flush() is failed.

Created on 30 Mar 2017  路  7Comments  路  Source: Blizzard/node-rdkafka

Version :
kafka : 2.11-0.10.2.0
node-rdkafka : v0.10.0
librdkafka: v0.9.4

There is one error when I use producer.flush() in my code.
Error information, as shown below.

node nkt_producer.js 10.160.19.232:9092 node-test2 hello
./node-rdkafka/lib/producer.js:338
this._client.flush(timeout);
^
TypeError: this._client.flush is not a function
at Producer.flush (./node-rdkafka/lib/producer.js:338:16)
at Producer. (./nktest/nkt_producer.js:64:12)
at emitOne (events.js:101:20)
at Producer.emit (events.js:188:7)
at ./node-rdkafka/lib/client.js:205:12
at ./node-rdkafka/lib/client.js:341:7

How do I solve this problem? Can any one give me some suggestions, please.

bug waiting next minor

Most helpful comment

Releasing this today! Sorry for the wait!

All 7 comments

Same problem..

Looks like the method wasn't added to the prototype. This is a bug. The previous version checked the RdKafka version before adding it to the prototype, but the current version assumes 0.9.4 or greater, and that code wasn't added.

This is a new 0.9.3 feature so it hasn't been tested much, but I'm going to fix this issue in the next day or so and publish a new version under 0.10.1

I see, thanks!

Fixed in this commit: https://github.com/Blizzard/node-rdkafka/commit/41e613cf5c659f960a7359f18b61982b4c13aa92

However, given the api of flush, I am making the method async. Because the API is compatible I will be releasing this under 0.10.1 instead of a minor version bump.

I got this issue too, is there an ETA for the next minor version? Thanks!

+1 waiting on this fix also

Releasing this today! Sorry for the wait!

Was this page helpful?
0 / 5 - 0 ratings