Silverback is a message bus and broker integration library for .NET. It helps you build event-driven architectures and asynchronous workflows with first-class support for Apache Kafka and MQTT.
Silverback aims to be both high-level (consistent configuration and developer experience) and broker-aware. Kafka is a first-class citizen: features like partition-based parallelism, keys/partitioning, tombstones, Schema Registry integration, idempotency, and transactions are surfaced where they matter, instead of being abstracted away.
- Kafka-first, not Kafka-only – a consistent API across brokers, while still leveraging Kafka-specific capabilities.
- Reliable by design – transactional outbox, error policies, and storage-backed features.
- Operational usability – structured logging, diagnostics, and tracing.
- Built-in cross-cutting features – headers, validation, encryption, chunking, batching.
- Testability – in-memory broker mocks and end-to-end helpers.
Documentation, guides, and samples are available here: https://silverback-messaging.net
Silverback is modular – reference only what you need.
Core:
- Silverback.Core – message bus and core messaging components.
- Silverback.Core.Model – message semantics for event-driven/CQRS scenarios.
Broker integration:
- Silverback.Integration.Kafka – Kafka support.
- Silverback.Integration.Mqtt – MQTT support.
Optional features:
- Silverback.Core.Rx – Rx.NET integration.
- Silverback.Newtonsoft – Newtonsoft.Json serialization.
- Silverback.Kafka.SchemaRegistry – Confluent Schema Registry integration.
Storage (for outbox, client-side offsets, distributed locks):
- Silverback.Storage.PostgreSql
- Silverback.Storage.Sqlite
- Silverback.Storage.EntityFramework
- Silverback.Storage.Memory
Testing:
Starting with v5, Silverback targets the latest .NET LTS version only.
services.AddSilverback()
.WithConnectionToMessageBroker(options => options.AddKafka())
.AddKafkaClients(clients => clients
.WithBootstrapServers("PLAINTEXT://localhost:9092")
.AddProducer(producer => producer
.Produce<MyMessage>(endpoint => endpoint.ProduceTo("my-topic")))
.AddConsumer(consumer => consumer
.Consume<MyMessage>(endpoint => endpoint.ConsumeFrom("my-topic"))));See the docs site for guides, API reference, and runnable examples:
| Solution | Contents |
|---|---|
| Silverback.sln | Library source projects, unit and E2E tests, and code/documentation generators |
| Silverback.Samples.sln | Runnable usage examples; see the samples guide |
| Silverback.Tests.Extended.sln | Interactive testbench, real-broker integration and stress tests, general benchmarks and version comparisons, with references to the library sources |
| Tool | Purpose |
|---|---|
| Interactive testbench | Windows WPF application for producing messages and managing Docker consumers |
| Integration tests | xUnit tests against real Kafka and MQTT brokers, including stress workloads and diagnostic controls |
| Benchmarks | General performance benchmarks and current-versus-historical Silverback comparisons |
| UpdateOlderVersions.ps1 | Scaffold another historical benchmark project |
| coverage.ps1 | Build and test the main solution with coverage, then generate and open an HTML report |
| docker-compose.yaml | Local Kafka, Schema Registry, MQTT and PostgreSQL infrastructure, with administration UIs |
| nuget/Update.ps1 | Build local Silverback packages for package-based development and samples |
| .NET tool manifest | Repository-local ReportGenerator installation used by the coverage script |
The four generator applications are included in the main solution and write generated content to standard output. Shared generator support lives in Silverback.Tools.Generators.Common.
| Tool | Purpose |
|---|---|
| KafkaConfigProxies | Generate Kafka configuration wrappers and builders; also supports Schema Registry configuration |
| MqttConfigProxies | Generate MQTT configuration wrappers and builders |
| Docs.Headers | Generate message-header reference tables |
| Docs.LogEvents | Generate log-event reference tables |
| docs/build.ps1 | Build and serve the DocFX documentation locally; run from the docs directory |
| docs/publish.ps1 | Publish the generated site through a separate gh-pages checkout; supports -NoPush |
Build automation is defined in the main pipeline, the Sonar pipeline, and the samples/extended-tests pipeline.
See CONTRIBUTING.md.
MIT License. See LICENSE.