kafka-avro-keyruler

1.3.5 • Public • Published

kafka-avro - keyruler version Sponsor Build status

This is a fork of waldophotos/kafka-avro which intends to follow upstream with one major difference, that it is Promised based.

Why promises?

Most of this depends on the work we have done in keyruler-avsc. Because that library uses promise the serialize/deserialize data we neede to do these changes. The event system is basically the same since it's already async.

Ensure delivery

Since this libray uses Promises to tell the user when a message has been sent we might actually want to know that the message has been sent. To do this we use delivery-report in the background and return your promise when the report has been recieved. To use this you need to pass { ensureDelivery: true } to getProducer.

Example:

// kafkaAvro is an already initalized instance of KafkaAvro.
kafkaAvro.getProducer({...}, {...}, { ensureDelivery: true })
    .then((producer) => producer.produce("topic", -1, {...}, "key"));

Readme

Keywords

none

Package Sidebar

Install

npm i kafka-avro-keyruler

Weekly Downloads

1

Version

1.3.5

License

MIT

Unpacked Size

60.1 kB

Total Files

24

Last publish

Collaborators

  • olssonhenrik