MinimalKafka 0.3.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package MinimalKafka --version 0.3.1                
NuGet\Install-Package MinimalKafka -Version 0.3.1                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="MinimalKafka" Version="0.3.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add MinimalKafka --version 0.3.1                
#r "nuget: MinimalKafka, 0.3.1"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install MinimalKafka as a Cake Addin
#addin nuget:?package=MinimalKafka&version=0.3.1

// Install MinimalKafka as a Cake Tool
#tool nuget:?package=MinimalKafka&version=0.3.1                

MinimalKafka

Github Release GitHub Actions Workflow Status GitHub License Github Issues Open Github Pull Request Open Scheduled Code Security Testing

MinimalKafka is a Kafka consumer library designed to consume messages similarly to a Minimal API. This repository provides a streamlined and efficient way to work with Kafka consumers in .NET 8.0.

Alt text

Features

  • Simple and minimalistic Kafka consumer setup
  • Built to integrate seamlessly with .NET 8.0 applications
  • Utilizes the Confluent.Kafka for robust Kafka interactions

Installation

To install MinimalKafka, use the NuGet package manager:

dotnet add package MinimalKafka

Usage

Setting Up a Kafka Consumer

Below is a basic example of how to set up a Kafka consumer using MinimalKafka. For more detailed examples, refer to the example folder in the repository.

using MinimalKafka;

var builder = WebApplication.CreateBuilder(args);

.Services.AddMinimalKafka(config => 
{ 
    config.WithBootstrapServers("localhost:9092")
          .WithGroupId(Guid.NewGuid().ToString())
          .WithOffsetReset(AutoOffsetReset.Earliest); 
});

var app = builder.Build();

app.MapTopic("topic.name", (string key, string value) => {
    
    // Implement your code here
    return Task.CompletedTask;

}).WithGroupId("Topic 2");

await app.RunAsync();

Contribution

Contributions are welcome! Please submit a pull request or open an issue to discuss your ideas or improvements.

License

This project is licensed under the MIT License.

Contact

For any questions or support, please open an issue in the repository.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.8.0 61 11/20/2024
0.7.1 87 11/14/2024
0.7.0 84 11/13/2024
0.6.0 148 10/31/2024
0.5.1 249 10/23/2024
0.5.0 80 10/22/2024
0.4.0 78 10/22/2024
0.3.1 116 10/12/2024
0.3.0 179 8/29/2024
0.2.2 123 8/22/2024
0.2.1 189 7/23/2024
0.2.0 79 7/23/2024
0.1.0 88 7/22/2024