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
Describe the bug
I upgraded kafkajs to 1.15 from 1.12 and found a consumer was crashing with
TypeError: assignment[assignee][topicPartition.topic].push is not a function
After digging a little deeper, the problem was caused by having a topic called shift. What happens is that here an array is created (instead of an object), and the builtin shift method is mistaken for that topic's assignment.
To Reproduce
Call assign with a topic named shift, or any other array builtin method.
Expected behavior
This should not crash, I should be able to call my topics shift or even __proto__.
Observed behavior
The consumer crashes at startup.
Environment:
OS: Arch Linux
KafkaJS version: 1.15
Kafka version: not sure, shouldn't be relevant
NodeJS version: 12.20
I'm opening a PR with a fix.
The text was updated successfully, but these errors were encountered:
Describe the bug
I upgraded
kafkajs
to 1.15 from 1.12 and found a consumer was crashing withAfter digging a little deeper, the problem was caused by having a topic called
shift
. What happens is that here an array is created (instead of an object), and the builtinshift
method is mistaken for that topic's assignment.To Reproduce
Call
assign
with a topic namedshift
, or any other array builtin method.Expected behavior
This should not crash, I should be able to call my topics
shift
or even__proto__
.Observed behavior
The consumer crashes at startup.
Environment:
I'm opening a PR with a fix.
The text was updated successfully, but these errors were encountered: