A streamlined wrapper around node-rdkafka made with independent composable parts.
Packages
This repository is a monorepo that we manage using Lerna. That means that we actually publish several packages to npm from the same codebase, including:
name | version |
---|---|
knack-avro |
|
A module for encoding and decoding avro with Kafka. | |
knack-consumer |
|
A module for consuming messages from Apache Kafka. | |
knack-consumer-client |
|
A module for consuming records from Apache Kafka with integrated avro support. | |
knack-producer |
|
A module for publishing to Apache Kafka. | |
knack-producer-client |
|
A module for publishing records to Apache Kafka with integrated avro support. | |
knack-sr |
|
A module for interacting with the Kafka Schema Registry. | |
knack-cli |
|
A cli for working with Apache Kafka development. |
Development
initialize lerna for all packages
$ lerna init
$ lerna bootstrap --hoist
run tests
$ npm test
Editors
VS Code
extensions
settings.json
{
"xo.enable": true,
"xo.format.enable": true,
"javascript.format.enable": false,
"javascript.validate.enable": false,
"prettier.tabWidth": 4,
"prettier.useTabs": true,
"prettier.semi": false,
"prettier.singleQuote": true,
"[json]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[javascript]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "samverschueren.linter-xo"
}
}
Examples
Initial working code examples can be found in the knack-cli/src
folder.
Contributing to the Project
The Knack team is open to contributions to our project. For more details, see our Contribution Guide.
© Optum 2019