You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm facing the following error when I try to produce a message to a kafka topic that has more than one partition. I've tried the exactly code on topics with 1, 2, 3 and 4 partitions and it only works for topics with 1 partition.
TypeError: Cannot read property 'v3' of undefined
at JSProducer._murmur (~/node_modules/sinek/dist/lib/kafkajs/JSProducer.js:108:77)
at JSProducer._getPartitionForKey (~/node_modules/sinek/dist/lib/kafkajs/JSProducer.js:206:21)
at JSProducer.<anonymous> (~/node_modules/sinek/dist/lib/kafkajs/JSProducer.js:254:34)
at Generator.next (<anonymous>)
at fulfilled (~/node_modules/sinek/dist/lib/kafkajs/JSProducer.js:5:58)
Not sure if anyone else has the same issue or if I'm doing something wrong but please let me know, other than that, if this replace sounds correct, will be a pleasure to contribute with a PR.
Thanks in advance. ✌️
The text was updated successfully, but these errors were encountered:
Hello!
I'm facing the following error when I try to produce a message to a kafka topic that has more than one partition. I've tried the exactly code on topics with 1, 2, 3 and 4 partitions and it only works for topics with 1 partition.
I was able to track the issue a little bit:
This is the piece where the code breaks:
it states that "murmur" is undefined. Removing "murmur" from the call - leaving only
murmurhash_1.v3(key)
- it works just fine. 👌Going into a little further into murmurhash package, we can find this, a conditional on how the value will be exported.
I don't know when a
module
has type undefined but on every test that I did it was always atypeof object
.Going back to JSProducer, replacing this:
node-sinek/src/lib/kafkajs/JSProducer.ts
Line 5 in 48e8425
with this
worked for me.
Not sure if anyone else has the same issue or if I'm doing something wrong but please let me know, other than that, if this replace sounds correct, will be a pleasure to contribute with a PR.
Thanks in advance. ✌️
The text was updated successfully, but these errors were encountered: