Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Comparing kafka-node and node-rdkafka

I would like to use Kafka with my Node.JS services as a message broker and am debating between the kafka-node and node-rdkafka libraries.

I started testing kafka-node's capabilities (the library seems to be much more popular) and was able to create a producer, write to Kafka with it, create a consumer, and read from Kafka with it. However, I noticed that the library does not currently support some Kafka features such as writing timestamps and lz4 compression (features that the Scala driver that I am using supports).

Has anyone run into these or other setbacks in kafka-node (or node-rdkafka) and decided to use another library due to them?

like image 882
Michal Avatar asked Apr 16 '17 08:04

Michal


1 Answers

Michal,

I recently completed a comparison of the two libraries. http://www.tivix.com/blog/nodejs-kafka-producers/. You will find implementations for both clients. In summary, I found that rdkafka has lower cpu utilization than node kafka. Moreover, it is maintained by Blizzard, so I am sure they would be happy to accept any PRs you provided.

like image 150
Ryan Stack Avatar answered Oct 11 '22 19:10

Ryan Stack