0

I'm using kafkajs nodejs library, which doesn't fully implement a batch publish, and from my side I see only one way - is implement it by myself, but I don't fully understand how to do it, so I have some questions

  1. How should I calculate message size to implement batch.size property?
  2. If application is gracefully shutdown, then I can just force publish messages from the producer buffer in the shutdown hooks, is it right?
  3. If application was killed by sigkill signal, how I should avoid messages lost?
mxxnseat
  • 314
  • 1
  • 2
  • 8

0 Answers0