{"repo":"fastify/fastify-kafka","free":true,"listed":false,"github":"https://github.com/fastify/fastify-kafka","clone":"git clone https://github.com/fastify/fastify-kafka.git","description":"Fastify plugin to interact with Apache Kafka","language":"JavaScript","stars":72,"topics":["kafka","events","event-sourcing","fastify","fastify-plugin"],"license":"MIT","category":"data-pipelines","readme_excerpt":"@fastify/kafka Fastify plugin to interact with Apache Kafka, supporting Kafka producers and consumers. To achieve the best performance, the plugin uses @platformatic/kafka . Install Compatibility Plugin version Fastify version --------------- ----------------- =3.x ^5.x =0.x =0.x =0.x =0.x <3.x ^1.x Please note that if a Fastify version is out of support, then so are the corresponding versions of this plugin in the table above. See Fastify's LTS policy for more details. Usage For more examples on how to use this plugin, you can take a look at the examples directory. Migration from node-rdkafka Starting from version 3.x , this plugin uses @platformatic/kafka instead of node-rdkafka . The main differences in the configuration options are: node-rdkafka (old) @platformatic/kafka (new) --------------------------------- ----------------------------------- metadata.broker.list bootstrapBrokers: ['host:port'] group.id groupId fetch.wait.max.ms maxWaitTime enable.auto.commit autocommit auto.offset.reset passed via consumerTopicConf dr cb not needed API This module exposes the following APIs: Plugin options Producer - fastify.kafka.producer — the producer instance - fastify.kafka.push(message) — send a message to a topic Consumer - fastify.kafka.consumer — the consumer instance - fastify.kafka.subscribe(topic topic[]) — subscribe to one or more topics - fastify.kafka.consume() — start streaming messages (flow mode) - fastify.kafka.consume(n, callback) — fetch exactly n messages (batch ","default_branch":null,"files":null,"tree":[],"storefront":"/r/fastify","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/fastify/fastify-kafka/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}