question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

KafkaJS crashes with typescript due to missing offset

See original GitHub issue

I 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:closed
  • Created 5 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
Nevoncommented, Mar 8, 2019

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. 😃

0reactions
Borewitcommented, Aug 11, 2019

The error thrown if the offset is not provided is most likely related to feross/buffer#237

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found