When passing an empty array (removing all subscriptions) to NConsumer#adjustSubscription() the following error occurs.
Error: Local: Invalid argument or configuration
at Function.createLibrdkafkaError [as create] (node_modules/node-rdkafka/lib/error.js:260:10)
at KafkaConsumer.Client._errorWrap (node_modules/node-rdkafka/lib/client.js:470:29)
at KafkaConsumer.subscribe (node_modules/node-rdkafka/lib/kafka-consumer.js:290:8)
at NConsumer.adjustSubscription (node_modules/sinek/lib/librdkafka/NConsumer.js:669:19)
I worked around this by calling the unsubscribe() method of the underlying consumer - like adjustSubscription() does before setting the new subscription - in case the new topic list is emtpy.
When passing an empty array (removing all subscriptions) to NConsumer#adjustSubscription() the following error occurs.
I worked around this by calling the
unsubscribe()
method of the underlying consumer - likeadjustSubscription()
does before setting the new subscription - in case the new topic list is emtpy.Thanks and have a nice day!