tulios/kafkajs
Fork: 483 Star: 3433 (更新于 1970-01-01 00:00:00)
license: MIT
Language: JavaScript .
A modern Apache Kafka client for node.js
最后发布版本: v2.2.4 ( 2023-02-27 21:18:04)
KafkaJS
A modern Apache Kafka® client for Node.js
Get Started »
Read the Docs
·
Report Bug
·
Request Feature
Table of Contents
About the Project
KafkaJS is a modern Apache Kafka client for Node.js. It is compatible with Kafka 0.10+ and offers native support for 0.11 features.
KAFKA is a registered trademark of The Apache Software Foundation and has been licensed for use by KafkaJS. KafkaJS has no affiliation with and is not endorsed by The Apache Software Foundation.
Sponsors ❤️
Upstash: Serverless Kafka
|
Get help directly from a KafkaJS developer
|
To become a sponsor, reach out in our Slack community to get in touch with one of the maintainers. Also consider becoming a Github Sponsor by following any of the links under "Sponsor this project" in the sidebar.
Features
- Producer
- Consumer groups with pause, resume, and seek
- Transactional support for producers and consumers
- Message headers
- GZIP compression
- Snappy, LZ4 and ZSTD compression through pluggable codecs
- Plain, SSL and SASL_SSL implementations
- Support for SCRAM-SHA-256 and SCRAM-SHA-512
- Support for AWS IAM authentication
- Admin client
Getting Started
npm install kafkajs
# yarn add kafkajs
Usage
const { Kafka } = require('kafkajs')
const kafka = new Kafka({
clientId: 'my-app',
brokers: ['kafka1:9092', 'kafka2:9092']
})
const producer = kafka.producer()
const consumer = kafka.consumer({ groupId: 'test-group' })
const run = async () => {
// Producing
await producer.connect()
await producer.send({
topic: 'test-topic',
messages: [
{ value: 'Hello KafkaJS user!' },
],
})
// Consuming
await consumer.connect()
await consumer.subscribe({ topic: 'test-topic', fromBeginning: true })
await consumer.run({
eachMessage: async ({ topic, partition, message }) => {
console.log({
partition,
offset: message.offset,
value: message.value.toString(),
})
},
})
}
run().catch(console.error)
Learn more about using KafkaJS on the official site!
Read something on the website that didn't work with the latest stable version?
Check the pre-release versions - the website is updated on every merge to master.
Contributing
KafkaJS is an open-source project where development takes place in the open on GitHub. Although the project is maintained by a small group of dedicated volunteers, we are grateful to the community for bug fixes, feature development and other contributions.
See Developing KafkaJS for information on how to run and develop KafkaJS.
Help wanted 🤝
We welcome contributions to KafkaJS, but we also want to see a thriving third-party ecosystem. If you would like to create an open-source project that builds on top of KafkaJS, please get in touch and we'd be happy to provide feedback and support.
Here are some projects that we would like to build, but haven't yet been able to prioritize:
- Dead Letter Queue - Automatically reprocess messages
- ✅ Schema Registry - Now available! thanks to @erikengervall
- Metrics - Integrate with the instrumentation events to expose commonly used metrics
Contact 💬
License
See LICENSE for more details.
Acknowledgements
- Thanks to Sebastian Norde for the V1 logo ❤️
- Thanks to Tracy (Tan Yun) for the V2 logo ❤️
Apache Kafka and Kafka are either registered trademarks or trademarks of The Apache Software Foundation in the United States and other countries. KafkaJS has no affiliation with the Apache Software Foundation.
最近版本更新:(数据更新于 1970-01-01 00:00:00)
2023-02-27 21:18:04 v2.2.4
2022-11-21 17:36:19 v2.2.3
2022-10-18 15:53:18 v2.2.2
2022-10-13 22:50:42 v2.2.1
2022-08-16 17:04:20 v2.2.0
2022-06-28 19:01:48 v2.1.0
2022-05-31 16:43:35 v2.0.2
2022-05-23 14:58:50 v2.0.1
2022-05-06 17:24:28 v2.0.0
2022-02-09 17:56:25 v1.16.0
主题(topics):
kafka, kafka-client, nodejs, npm-package
tulios/kafkajs同语言 JavaScript最近更新仓库
2024-11-05 19:13:47 jerryc127/hexo-theme-butterfly
2024-11-05 13:53:42 LiteLoaderQQNT/LiteLoaderQQNT
2024-11-03 02:40:36 chris81605/Degrees-of-Lewdity_Cheat_Extended
2024-11-01 21:55:46 projectdiscovery/nuclei-templates
2024-11-01 19:24:44 NumberSir/DoL-I18n-Build
2024-11-01 12:25:14 midoks/mdserver-web