AvroConsumer C# equivalent?

First, I’m new to this so please forgive me if I use terminology incorrectly.

I’m using .NET (C#) to consume messages from a Kafka topic. The messages are originating from a Python producer that uses the (deprecated) AvroProducer class. The producer is using the schema registry so I need to consume and deserialize the message with that schema registry. I can do this in Python very easily and successfully using the (deprecated) AvroConsumer. I’m looking for the same functionality for .NET. Specifically, I want the JSON output of the json.dumps() method below but I need to do this in C#.

Can anybody point me in the right direction?

import json
from confluent_kafka import KafkaException
from confluent_kafka.avro import AvroConsumer

consumer_config = {
‘bootstrap.servers’: ‘[our bootstrap servers]’,
‘schema.registry.url’: ‘[our schema registry]’,
‘group.id’: ‘[my group id]’,
‘auto.offset.reset’: ‘earliest’

count = 1
consumer = AvroConsumer(consumer_config)
consumer.subscribe([‘[specific topic]’])

consume 10 messages

while count < 10:
msg = ‘’
msg = consumer.poll(1)
if msg is None:
print('Value: ’ + json.dumps(msg.value()))
except KafkaException as e:
print('Kafka failure: ’ + e)