
Security News
How Enterprise Security Is Adapting to AI-Accelerated Threats
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.
@restorecommerce/kafka-client
Advanced tools
A Node.js client for Apache Kafka based on kafka-node. Event messages structures are defined using Protocol Buffers with message encoding/decoding being achieved using protobufjs.
With this module, it is possible to have a fine grained control over which Kafka topics and event names the client can subscribe to. There could be multiple event names associated for the same message. Internally message events are emitted to local listeners using Node.js Events, which decode protobuf messages and execute the intended listeners.
This client includes a Provider object, which packages events and distributes them to the respective listeners. Currently, the following event providers are implemented:
When subscribing to a given event name, options can be passed. Currently, the supported subscription options are:
startingOffset - value for the starting offset to process messages; default is -1 (latest offset);queue - a boolean flag; if set to true, messages are queued and processed synchronously;forceOffset - a boolean flag; if set to true, startingOffset is considered above any other provided offset or configuration parameter.See tests. To execute the tests a set of backing services are needed. Refer to System repository to start the backing-services before running the tests.
npm run test
npm install
# compile the code
npm run build
FAQs
Opinionated Kafka Client for Microservices
The npm package @restorecommerce/kafka-client receives a total of 263 weekly downloads. As such, @restorecommerce/kafka-client popularity was classified as not popular.
We found that @restorecommerce/kafka-client demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.