node-rdkafka icon indicating copy to clipboard operation
node-rdkafka copied to clipboard

Add getMetadata to the AdminClient

Open mchastain-turner opened this issue 6 years ago • 2 comments

It seems like getMetadata should be available on the AdminClient. It would simplify managing topics from one client instance. The only other option is to spin up a producer or consumer client and use it's getMetadata method ( or the connect callback ) to see what topics exist , which seems to be a bit of a hack. I know the Go client has an AdminClient.getMetadata method. It would be nice to have it here too.

mchastain-turner avatar Aug 08 '19 18:08 mchastain-turner

It seems librdkakfa doesn't provide metadata directly from the admin API but I agree it would totally make sense.

iradul avatar Aug 24 '19 03:08 iradul

How it is done in Go: https://github.com/confluentinc/confluent-kafka-go/blob/cfbc1edb6a54515310a0c7840bf4a24159b51876/kafka/metadata.go#L81

I've never played with C++ bindings but I could give it a whirl. It's a bit tricky to translate to javascript since Go is using pointers.

mchastain-turner avatar Aug 26 '19 13:08 mchastain-turner