KafkaJS crashes with typescript due to missing offset
See original GitHub issueI tried to use KafkaJS but it crashed immediately using these dependencies: "@types/node": "^11.10.5",
and "kafkajs": "^1.5.0",
I’m using it in a Typescript environment though, might be the issue.
producer/partitioners/default.js
line 22
let counter = crypto.randomBytes(32).readUInt32BE()
According to @types/node/globals.d.ts
readUInt32BE(offset: number): number;
.
I don’t know what the offset should be, if it should be zero or something, but leaving out an offset will have the application crash for me.
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Consuming Messages - KafkaJS
When a consumer fails the load is automatically distributed to other members of ... highWatermark is the last committed offset within the topic...
Read more >Unanswered 'kafkajs' Questions - Stack Overflow
Kafka consumer manual offset commit ... KafkaJs Crash: Value should be an instance of Encoder ... Is there any option that I may...
Read more >https://raw.githubusercontent.com/tulios/kafkajs/m...
Be sure to read it before upgrading from older versions of KafkaJS. ... Fixed - Missing default restart time on crashes due to...
Read more >Kafka Consumer | Confluent Documentation
If the consumer crashes before any offset has been committed, ... delivery: Kafka guarantees that no messages will be missed, but duplicates are...
Read more >kafkajs - npm
kafkajs. TypeScript icon, indicating that this package has built-in type declarations. 1.0.1 • Public • Published 5 years ago.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
That’s awesome. I’m actually working on browser compatibility at the moment, but it’s unfortunately not quite ready yet. In some weeks, I hope to have something available for you. 😃
The error thrown if the offset is not provided is most likely related to feross/buffer#237