Bielu.AspNetCore.AsyncApi.CloudEvents 2.0.0

Prefix Reserved
dotnet add package Bielu.AspNetCore.AsyncApi.CloudEvents --version 2.0.0
                    
NuGet\Install-Package Bielu.AspNetCore.AsyncApi.CloudEvents -Version 2.0.0
                    
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="Bielu.AspNetCore.AsyncApi.CloudEvents" Version="2.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Bielu.AspNetCore.AsyncApi.CloudEvents" Version="2.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Bielu.AspNetCore.AsyncApi.CloudEvents" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Bielu.AspNetCore.AsyncApi.CloudEvents --version 2.0.0
                    
#r "nuget: Bielu.AspNetCore.AsyncApi.CloudEvents, 2.0.0"
                    
#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.
#:package Bielu.AspNetCore.AsyncApi.CloudEvents@2.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Bielu.AspNetCore.AsyncApi.CloudEvents&version=2.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Bielu.AspNetCore.AsyncApi.CloudEvents&version=2.0.0
                    
Install as a Cake Tool

Bielu.AspNetCore.AsyncApi.CloudEvents

Describes your AsyncAPI messages as CloudEvents 1.0 events, so the document says what actually goes over the wire: the id, source, specversion and type attributes every consumer relies on, named the way each protocol binding names them.

Installation

dotnet add package Bielu.AspNetCore.AsyncApi.CloudEvents

Usage

builder.Services.AddAsyncApi(options => options
    .AddServer("kafka", "broker:9092", "kafka")
    .AddCloudEvents(cloudEvents => cloudEvents
        .WithSource("/orders")                 // pinned with const
        .WithTypePrefix("com.example.orders.") // type = prefix + message name
        .ConfigureMessage("orderCancelled", message => message.Type = "com.example.orders.cancelled.v2")));
  • Binary mode (default): each message's headers gain the context attributes. With a Kafka server they are ce_id, ce_source, ce_specversion, ce_type, …; HTTP/WebSockets use ce-, AMQP cloudEvents:, and MQTT 5 user properties have no prefix. The prefix is chosen from the protocol of the servers each message's channels use. Existing headers are kept and combined with allOf.
  • Structured mode (UseMode(CloudEventsMode.Structured)): the payload becomes the application/cloudevents+json envelope, with the original payload as data.

Message examples gain the attributes too, and the output validates against the official AsyncAPI 2.6.0 and 3.1.0 schemas.

Documentation

Feedback & Contributing

Copyright (c) 2025 Arkadiusz Biel. Released under the MIT license. Bug reports and contributions are welcome at the GitHub repository.

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

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Bielu.AspNetCore.AsyncApi.CloudEvents:

Package Downloads
Bielu.AspNetCore.AsyncApi.Wolverine

Wolverine integration for Bielu.AspNetCore.AsyncApi. Builds AsyncAPI channels, operations and messages from Wolverine's own message routing (SignalR, Kafka and any other transport), so the document follows the routing configuration instead of repeating it in attributes.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.0.0 218 10/25/2026
2.0.0-beta.20261025083222 60 10/25/2026
2.0.0-beta.20261025073559 51 10/25/2026
2.0.0-beta.20261024233532 57 10/24/2026
2.0.0-beta.20261024230848 59 10/24/2026
2.0.0-beta.20261024191358 56 10/24/2026
2.0.0-beta.20261024185247 57 10/24/2026
2.0.0-beta.20261024184446 51 10/24/2026
2.0.0-beta.20261024163851 56 10/24/2026
2.0.0-beta.20261024153849 54 10/24/2026