0

I'm trying to figure out if there is any way to programmatically check if provided credentials have read and write access to different Kafka topics using the Confluent Kafka lib for .NET.

What I want to do is basically a smoke test upon system startup, to verify that the given credentials are correct. e.g. when deploying to various environments with different settings.

Setting up an entire consumer or producer and then actually reading or writing data seems hacky and expensive.

I thought that maybe there could be something in e.g. the AdminClient that allows verifying this, but I don't see anything that hints in that direction.

Roger Johansson
  • 22,764
  • 18
  • 97
  • 193

1 Answers1

0

yes there is AdminClient implementation, please check out the following github repository example for .NET

https://github.com/confluentinc/confluent-kafka-dotnet/blob/master/examples/AdminClient/Program.cs

Ran Lupovich
  • 1,655
  • 1
  • 6
  • 13