How confluentinc/confluent-kafka-dotnet works
This repository is Confluent’s .NET client for Kafka and Schema Registry. The central workflow serializes application data (optionally registering and validating its schema), produces it to Kafka, then consumes and deserializes it. Separate capabilities manage Kafka resources, apply Schema Registry rules, and encrypt fields using DEKs and cloud KMS providers. The core client wraps librdkafka; Schema Registry access uses a REST client. The graph follows README-documented capabilities and the supplied source excerpts; unsampled subsystem wiring is shown only where documented.
Main entry points: LibRdKafka.cs librdkafka interop · Producer.cs Producer API · Consumer.cs Consumer API · JsonSerializer.cs Format serdes
Components 19
Kafka client
- Producer API
src/Confluent.Kafka/Producer.cs - Consumer API
src/Confluent.Kafka/Consumer.cs - Admin API
src/Confluent.Kafka/AdminClient.cs - librdkafka interop
src/Confluent.Kafka/Impl/LibRdKafka.cs
Schema Registry
- Format serdes
src/Confluent.SchemaRegistry.Serdes.Json/JsonSerializer.cs - Format deserds
src/Confluent.SchemaRegistry.Serdes.Json/JsonDeserializer.cs - Registry client
src/Confluent.SchemaRegistry/CachedSchemaRegistryClient.cs - Registry REST
src/Confluent.SchemaRegistry/Rest/RestService.cs
Rules and transforms
- Rule execution
src/Confluent.SchemaRegistry.Rules/CelExecutor.cs - JSONata rules
src/Confluent.SchemaRegistry.Rules/JsonataExecutor.cs
Field encryption
- Field encryption
src/Confluent.SchemaRegistry.Encryption/FieldEncryptionExecutor.cs - DEK registry cache
src/Confluent.SchemaRegistry.Encryption/CachedDekRegistryClient.cs - DEK REST service
src/Confluent.SchemaRegistry.Encryption/Rest/DekRestService.cs - KMS providers
src/Confluent.SchemaRegistry.Encryption.Aws/AwsKmsClient.cs
Authentication
- AWS OAuth handler
src/Confluent.Kafka.OAuthBearer.Aws/Internal/AwsOAuthBearerHandler.cs
Other components
- Application
- Kafka cluster
- Schema Registry
- AWS STS
Connections 21
- Application → Producer API: produces with
- Application → Consumer API: consumes with
- Application → Admin API: administers
- Producer API → Format serdes: serializes via
- Format serdes → Registry client: registers schema
- Format serdes → Producer API: returns bytes
- Producer API → librdkafka interop: dispatches records
- Consumer API → librdkafka interop: polls records
- librdkafka interop → Kafka cluster: Kafka protocol
- librdkafka interop → Consumer API: returns records
- Consumer API → Format deserds: deserializes via
- Format deserds → Registry client: looks up schema
- Admin API → librdkafka interop: dispatches admin requests
- Registry client → Registry REST: sends requests
- Registry REST → Schema Registry: REST requests
- Rule execution → JSONata rules: supports migration rules
- Field encryption → DEK registry cache: resolves DEKs
- DEK registry cache → DEK REST service: requests DEKs
- DEK REST service → Schema Registry: DEK REST requests
- Field encryption → KMS providers: wraps field keys
- AWS OAuth handler → AWS STS: resolves token