kambing86 / kafkajs-stream Goto Github PK
View Code? Open in Web Editor NEWStream for kafkajs in Node.js
Stream for kafkajs in Node.js
Hi! I've implemented a consumer stream based on your code and found that skipping batch messages can lead to huge performance issues in the case of a large batch. For example, if the stream client limits the load by pausing/resuming the stream every 10 messages and the batch contains 1,000 messages, then the Kafka client will load 1,000, 990, 980, and so on. To fix this, you should try to wait for the already loaded batch to resume instead of skipping it (but not for longer than the heartbeat interval).
kafkajs-stream/src/ConsumerStream.ts
Line 86 in d5e0e61
Hi,
thanks great for the work. It's a perfect lib for using kafkajs together with stream. However, could you provide more options to set autoCommit relevant flags. Just like the configs of kafkajs:
consumer.run({
autoCommit: false,
eachMessage: async ({ topic, partition, message }) => {
// Process the message somehow
},
})
We want to consume the kafka without offset commit. If possible, sincerely thousand thanks.
Best regards,
Kevin
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.