# Dekaf > High-performance, pure C# Apache Kafka client library for .NET. A zero-allocation implementation of the Kafka wire protocol with no librdkafka and no native interop. ## docs - [Introduction](https://dekaf.tomlonghurst.dev/docs.md): Dekaf is a high-performance, pure C# Apache Kafka client for .NET, implemented from the wire protocol up with no librdkafka or other native dependency. - [Cluster discovery](https://dekaf.tomlonghurst.dev/docs/admin/cluster-discovery.md): Discover registered Kafka brokers, including fenced nodes, without changing routing. - [Consumer group offsets](https://dekaf.tomlonghurst.dev/docs/admin/consumer-group-offsets.md): Query complete consumer-group checkpoints, batch groups, and wait for transactionally stable offsets. - [Controller unregistration](https://dekaf.tomlonghurst.dev/docs/admin/controller-unregistration.md): Remove a stale KRaft controller registration with UnregisterController (KIP-1312). - [Describing topics by name](https://dekaf.tomlonghurst.dev/docs/admin/describe-topics.md): Describe Kafka topics by name without creating missing topics. - [Detailed mutation outcomes](https://dekaf.tomlonghurst.dev/docs/admin/detailed-mutations.md): Batch topic mutations can succeed for some entities and fail for others. The optional - [Detailed share-group offset mutations](https://dekaf.tomlonghurst.dev/docs/admin/detailed-share-group-offsets.md): Use AlterShareGroupOffsetsDetailedAsync and DeleteShareGroupOffsetsDetailedAsync when a - [Group inventory](https://dekaf.tomlonghurst.dev/docs/admin/group-listing.md): List Kafka groups by group type, protocol, and state. - [Consumer-group member removal](https://dekaf.tomlonghurst.dev/docs/admin/member-removal.md): Evict explicit static or dynamic members, or a snapshot of all current members. - [Node-specific feature discovery](https://dekaf.tomlonghurst.dev/docs/admin/node-features.md): Inspect supported Kafka features on a selected broker or controller. - [Partition expansion](https://dekaf.tomlonghurst.dev/docs/admin/partition-expansion.md): Use CreatePartitionsAsync to increase a topic's partition count. TotalCount - [Replica log directories](https://dekaf.tomlonghurst.dev/docs/admin/replica-log-directories.md): Query current and future Kafka log directories for selected replicas. - [Batch share-group offset queries](https://dekaf.tomlonghurst.dev/docs/admin/share-group-offset-queries.md): ListShareGroupOffsetsAsync queries offsets for several share groups and returns an outcome keyed by each requested group ID. It maps to Kafka Admin's listShareGroupOffsets operation. The existing DescribeShareGroupOffsetsAsync(groupId, partitions) method remains available for single-group callers. - [Streams group management](https://dekaf.tomlonghurst.dev/docs/admin/streams-group-management.md): List, alter, and delete Kafka Streams group offsets and groups, and read topology descriptions. - [Topic identifiers](https://dekaf.tomlonghurst.dev/docs/admin/topic-identifiers.md): Describe and delete Kafka topics by stable topic ID. - [Topic readiness](https://dekaf.tomlonghurst.dev/docs/admin/topic-readiness.md): Wait until existing Kafka topics are visible with partition leaders, without creating them. - [Transaction remediation](https://dekaf.tomlonghurst.dev/docs/admin/transaction-remediation.md): Inspect, fence, terminate, or abort Kafka transactions safely. - [API and Runtime Compatibility](https://dekaf.tomlonghurst.dev/docs/api-compatibility.md): Package targets, tested runtimes, Native AOT coverage, and how Dekaf validates its public API surface. - [Aspire](https://dekaf.tomlonghurst.dev/docs/aspire.md): Run Kafka and Schema Registry in an Aspire AppHost and register Dekaf producers, consumers, share consumers and Schema Registry clients with configuration, health checks and OpenTelemetry. - [Benchmark Results](https://dekaf.tomlonghurst.dev/docs/benchmarks.md): Dekaf versus Confluent.Kafka on throughput, latency, and allocations, measured with BenchmarkDotNet in automated runs from main. - [Compatibility](https://dekaf.tomlonghurst.dev/docs/compatibility.md): Which .NET targets each Dekaf package supports, the netstandard2.0 restore baseline, and the blocker categories tracked against it. - [Compression](https://dekaf.tomlonghurst.dev/docs/compression.md): The available compression codecs, how to install and enable batch compression, and how to pick one for your throughput and CPU budget. - [Client DNS Lookup](https://dekaf.tomlonghurst.dev/docs/configuration/client-dns-lookup.md): How Dekaf resolves broker hostnames before connecting, the available DNS lookup modes, and the bootstrap resolution deadline. - [Migrate Confluent configuration](https://dekaf.tomlonghurst.dev/docs/configuration/confluent-migration.md): Translate existing Confluent-style configuration to Dekaf, including Aspire setup, a settings compatibility matrix, and CoreWCF Kafka migration. - [Consumer Options](https://dekaf.tomlonghurst.dev/docs/configuration/consumer-options.md): Complete reference for every consumer setting, covering connection, group coordination, offsets, fetch and session tuning, subscription, and rebalancing. - [Configuration Presets](https://dekaf.tomlonghurst.dev/docs/configuration/presets.md): Ready-made producer and consumer configurations for common scenarios, how to override individual values, and how to define your own preset. - [Producer Options](https://dekaf.tomlonghurst.dev/docs/configuration/producer-options.md): Complete reference for every producer setting, covering connection, delivery guarantees, batching, compression, partitioning, transactions, and security. - [Consumer Basics](https://dekaf.tomlonghurst.dev/docs/consumer/basics.md): Create a consumer, subscribe to topics, and process records with await foreach, including auto offset reset, error handling, and graceful shutdown. - [Consumer Groups](https://dekaf.tomlonghurst.dev/docs/consumer/consumer-groups.md): Share partitions across consumer instances, covering rebalancing, static membership, session and heartbeat tuning, and how to scale group members. - [Dead Letter Queues and Retry Topics](https://dekaf.tomlonghurst.dev/docs/consumer/dead-letter-queues.md): Park repeatedly failing records in a companion topic instead of stalling the consumer, with tiered retry topics, failure counting, and custom routing. - [Delivery Semantics](https://dekaf.tomlonghurst.dev/docs/consumer/delivery-semantics.md): The definitive reference for what happens to a message when processing fails, how Dekaf's default compares to other clients, and how to choose a guarantee. - [Pre-deserialization filtering and routing](https://dekaf.tomlonghurst.dev/docs/consumer/filtering-and-routing.md): Reject records or choose a deserializer from raw keys, values, and headers before typed deserialization. - [LINQ Extensions](https://dekaf.tomlonghurst.dev/docs/consumer/linq-extensions.md): LINQ-style Where, Select, Take, Batch, and ForEachAsync operators over consumed messages, and why filtering skips records permanently. - [Manual Partition Assignment](https://dekaf.tomlonghurst.dev/docs/consumer/manual-assignment.md): Assign specific partitions directly instead of joining a consumer group, with manual offset management, seeking, and incremental assignment. - [Offset Management](https://dekaf.tomlonghurst.dev/docs/consumer/offset-management.md): Offset commit modes, commit strategies, seeking, and inspecting committed offsets, so you can choose the right delivery guarantee. - [Partitioned Async Processing](https://dekaf.tomlonghurst.dev/docs/consumer/partitioned-processing-api.md): RunPartitionedAsync keeps per-key work ordered while processing partitions in parallel, covering commit semantics, backpressure, and error policy. - [Share Consumers (KIP-932)](https://dekaf.tomlonghurst.dev/docs/consumer/share-consumers.md): Queue-style consumption with share groups (KIP-932): record-level acknowledgement, Accept/Release/Reject, implicit vs explicit modes, and acquisition lock renewal. - [Dependency Injection](https://dekaf.tomlonghurst.dev/docs/dependency-injection.md): Register Dekaf producers and consumers in the ASP.NET Core container, including multiple clients, global interceptors, appsettings binding, and NativeAOT. - [Getting Started](https://dekaf.tomlonghurst.dev/docs/getting-started.md): Install Dekaf, run Kafka locally, and write your first producer and consumer. - [Health Checks](https://dekaf.tomlonghurst.dev/docs/health-checks.md): Separate producer flush checkpoints, delivery outcomes, and Kafka broker connectivity in ASP.NET Core health checks. - [Hosted Consumer Services](https://dekaf.tomlonghurst.dev/docs/hosted-services.md): KafkaConsumerService runs a consumer for your application's lifetime, handling scoped dependencies, failure handling, and shutdown behaviour. - [Kafka feature support](https://dekaf.tomlonghurst.dev/docs/kafka-feature-support.md): Kafka feature and KIP support, broker capability requirements, runtime limits, and validation evidence. - [Migrate from Confluent.Kafka](https://dekaf.tomlonghurst.dev/docs/migrating-from-confluent-kafka.md): Move a .NET application from Confluent.Kafka to Dekaf, including producers, consumers, delivery semantics, serializers, transactions, and configuration. - [Observability (OpenTelemetry)](https://dekaf.tomlonghurst.dev/docs/observability.md): Dekaf's built-in ActivitySource and Meter for OpenTelemetry tracing and metrics, plus broker-side telemetry (KIP-714). Zero cost when nothing is listening. - [Performance](https://dekaf.tomlonghurst.dev/docs/performance.md): What makes Dekaf fast, how to tune batching and compression for your workload, what throughput to expect, and the common mistakes that cost you. - [Producer Basics](https://dekaf.tomlonghurst.dev/docs/producer/basics.md): Create a producer and send messages, covering acks and delivery guarantees, batching, compression, the idempotent producer, and ordering. - [Batch Production](https://dekaf.tomlonghurst.dev/docs/producer/batch-production.md): ProduceAllAsync sends many messages concurrently without the pitfalls of awaiting ValueTask in a loop, including partial success handling. - [Fire-and-Forget Production](https://dekaf.tomlonghurst.dev/docs/producer/fire-and-forget.md): FireAsync enqueues records without waiting for broker acknowledgment, how it differs from ProduceAsync, and how to still guarantee delivery. - [Message Headers](https://dekaf.tomlonghurst.dev/docs/producer/headers.md): Attach metadata such as trace IDs and message types to records, read headers on the consumer side, and understand their performance cost. - [Transactional Outbox](https://dekaf.tomlonghurst.dev/docs/producer/outbox.md): At-least-once publishing from your database to Kafka without distributed transactions, covering delivery, ordering, scaling, deduplication, tuning, and metrics for every outbox store. - [Custom Outbox Stores](https://dekaf.tomlonghurst.dev/docs/producer/outbox/custom-stores.md): Implement the outbox store contract for any database: lease timing, the four-method contract, stable bucket ownership, graceful handover, and wiring. - [Amazon DynamoDB Outbox Store](https://dekaf.tomlonghurst.dev/docs/producer/outbox/dynamodb.md): Register the DynamoDB outbox store, provision its table, enqueue messages inside TransactWriteItems, and understand the item schema and how relays share buckets. - [Entity Framework Core Outbox Store](https://dekaf.tomlonghurst.dev/docs/producer/outbox/entity-framework-core.md): Register the Entity Framework Core outbox store, map and provision its three tables, customize table names, and enqueue messages in the same transaction as your business data. - [Partitioning](https://dekaf.tomlonghurst.dev/docs/producer/partitioning.md): How keys map to partitions, the available partitioner types, explicit partition assignment, and the ordering guarantees each choice gives you. - [Topic-Specific Producers](https://dekaf.tomlonghurst.dev/docs/producer/topic-producer.md): ITopicProducer binds to a single topic at construction so you skip the topic argument on every call, with disposal semantics and DI wiring. - [Transactions](https://dekaf.tomlonghurst.dev/docs/producer/transactions.md): Atomic writes across partitions and topics for exactly-once semantics, covering consume-transform-produce, isolation levels, timeouts, and error handling. - [OAuth / OAUTHBEARER](https://dekaf.tomlonghurst.dev/docs/security/oauth.md): OAUTHBEARER authentication with custom token providers, JWT-bearer and client assertion grants, Azure AD, AWS MSK IAM, and token refresh. - [SASL Authentication](https://dekaf.tomlonghurst.dev/docs/security/sasl.md): SASL/PLAIN, SCRAM, GSSAPI (Kerberos), and AWS_MSK_IAM authentication for Dekaf, including Confluent Cloud setup and securing credentials. - [TLS Encryption](https://dekaf.tomlonghurst.dev/docs/security/tls.md): Encrypt broker connections with TLS, supply a custom CA certificate, configure mutual TLS, and troubleshoot common handshake failures. - [Built-in Serializers](https://dekaf.tomlonghurst.dev/docs/serialization/built-in.md): The serializers Dekaf selects automatically for strings, byte arrays, ReadOnlyMemory, integers, and Guid, and how to specify them explicitly. - [Custom Serializers](https://dekaf.tomlonghurst.dev/docs/serialization/custom.md): Implement ISerializer and IDeserializer, write a zero-allocation serializer, use SerializationContext, and handle nulls and async serdes. - [JSON Serialization](https://dekaf.tomlonghurst.dev/docs/serialization/json.md): System.Text.Json serialization for Dekaf, with custom JsonSerializerOptions, polymorphic types, NativeAOT support, and error handling. - [Routing Serdes](https://dekaf.tomlonghurst.dev/docs/serialization/routing.md): Route heterogeneous records by topic or by schema ID without allocating in steady state, on both the produce and consume sides. - [Schema Registry](https://dekaf.tomlonghurst.dev/docs/serialization/schema-registry.md): Confluent Schema Registry with Avro and Protobuf, JSON Schema validation, and client-side field-level encryption via AWS, Azure, GCP, Alibaba Cloud, or Vault KMS. - [24-hour soak tests](https://dekaf.tomlonghurst.dev/docs/soak-tests.md): The 24-hour mixed producer and consumer soak run, the failure gates it enforces, and how to run it locally. - [Stream Processing](https://dekaf.tomlonghurst.dev/docs/streams.md): Dekaf.Streams runs stateful stream-processing topologies on Kafka 4.4+: a typed DSL, changelog-backed state, windows, joins and exactly-once processing. - [Topology Operators](https://dekaf.tomlonghurst.dev/docs/streams/operators.md): Reference for the Dekaf.Streams topology DSL: stateless operators, grouping and aggregation, windows, stream-table joins and the processor API. - [Testing Topologies](https://dekaf.tomlonghurst.dev/docs/streams/testing.md): Test Dekaf.Streams topologies without a broker using TopologyTestDriver: pipe records in with explicit timestamps, read output and inspect state stores. - [Stress Test Results](https://dekaf.tomlonghurst.dev/docs/stress-tests.md): Long-running stress tests comparing sustained performance between Dekaf and Confluent.Kafka under real-world load. - [Testing](https://dekaf.tomlonghurst.dev/docs/testing.md): Dekaf.Testing provides in-memory producers and consumers for fast unit tests, plus DI wiring, admin and offset fakes, and NativeAOT smoke validation. - [Deterministic fault injection](https://dekaf.tomlonghurst.dev/docs/testing/fault-injection.md): Script deterministic producer, consumer, group, transaction, Admin, and Share Consumer failures with Dekaf.Testing.