I'm in the same boat

On Thu, Jan 24, 2019, 4:36 AM Rahul Singh <
rahul.si...@smartsensesolutions.com wrote:

> Hi All,
>
> I am facing error while creating topic manually using kafka-node client.
> The code is mentioned below.
>
> Can anyone help please?
>
> let topicsToCreate = [{ topic: topicName, partitions: 1, replicationFactor:
> 2 }];
>         admin.createTopics(topicsToCreate, (err, data) => {
>             if (err) {
>                 console.log(err)
>             } else {
>                 console.log(data)
>             }
>         });
>
> The error it is throwing is given below ::
>
> Error: No broker with id undefined
>     at KafkaClient.sendRequestToBroker
> (/Kafka/KafkaDemo/node_modules/kafka-node/lib/kafkaClient.js:1089:21)
>     at getController
> (/Kafka/KafkaDemo/node_modules/kafka-node/lib/kafkaClient.js:1190:10)
>     at loadMetadata
> (/Kafka/KafkaDemo/node_modules/kafka-node/lib/kafkaClient.js:287:12)
>     at async.series
> (/Kafka/KafkaDemo/node_modules/kafka-node/lib/kafkaClient.js:892:7)
>     at /Kafka/KafkaDemo/node_modules/async/dist/async.js:3888:9
>     at /Kafka/KafkaDemo/node_modules/async/dist/async.js:473:16
>     at replenish
> (/Kafka/KafkaDemo/node_modules/async/dist/async.js:1006:25)
>     at iterateeCallback
> (/Kafka/KafkaDemo/node_modules/async/dist/async.js:995:17)
>     at /Kafka/KafkaDemo/node_modules/async/dist/async.js:969:16
>     at /Kafka/KafkaDemo/node_modules/async/dist/async.js:3885:13
>

Reply via email to