A high-performance Kafka client written in managed C#.
Jackdaw aims to be API-compatible with the official Confluent Kafka library, so that any migration to Jackdaw should be seamless, even down to the config settings used.
Jackdaw aims to be:
- 🏃 High-performance with low memory usage
- 🔧 Extensible for use cases such as AWS IAM authentication
- 🤝 Cross-platform using fully managed code
- ✅ API-compliant to the official Confluent Kafka library
Install the package from NuGet with dotnet add package Jackdaw.
Create your producer and/or consumer with the correct settings, and publish/subscribe to the topics you need, as below:
var producerConfig = new ProducerConfig
{
BootstrapServers = "localhost:9092"
};
var consumerConfig = new ConsumerConfig
{
BootstrapServers = "localhost:9092",
GroupId = "my-group"
};
using var producer = new ProducerBuilder<string, string>(producerConfig)
.Build();
using var consumer = new ConsumerBuilder<string, string>(consumerConfig)
.Build();
producer.Produce("my-topic", new Message<string, string>
{
Key = "key", Value = "value"
});
consumer.Subscribe("my-topic");
var result = consumer.Consume();See the wiki for examples and help using Jackdaw.
Discuss with us on Discussions, or raise an issue.
Please read CONTRIBUTING.md for details on how to contribute to this project.
With much ❤️ to the Confluent Kafka library.
Jackdaw is released under the Apache 2.0 License