narcisoguillen / kafka-node-avro

ISC License
26 stars 13 forks source link

How can I close producer #6

Closed wips closed 4 years ago

wips commented 5 years ago

After I run my script I can't close producer and the script never finishes. Is it possible to do it somehow in current version?

narcisoguillen commented 5 years ago

Hey ! , thanks for using kafka-node-avro, oh ! you are right it has no close mechanism, I will start to write that on a branch and add a test to it, you are welcome to help if you want.

I'm planning on adding a general close mechanism as

 kafka.close( closed => {
   // - close all open consumers 
   // - close all open producers 
   // - flush schema pool ( clean ) 
   // - close kafka client
 });

Tanks for helping making this lib better.

narcisoguillen commented 5 years ago

I started the PR for this new feature : https://github.com/narcisoguillen/kafka-node-avro/pull/7

FrancoisXavierNoe commented 4 years ago

Hello, Do you have any idea of when this feature can be availlable ? Thanks,