XiHan.Framework.Messaging.Abstractions
5.0.0-preview.2
Prefix Reserved
This is a prerelease version of XiHan.Framework.Messaging.Abstractions.
dotnet add package XiHan.Framework.Messaging.Abstractions --version 5.0.0-preview.2
NuGet\Install-Package XiHan.Framework.Messaging.Abstractions -Version 5.0.0-preview.2
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="XiHan.Framework.Messaging.Abstractions" Version="5.0.0-preview.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="XiHan.Framework.Messaging.Abstractions" Version="5.0.0-preview.2" />
<PackageReference Include="XiHan.Framework.Messaging.Abstractions" />
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 XiHan.Framework.Messaging.Abstractions --version 5.0.0-preview.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: XiHan.Framework.Messaging.Abstractions, 5.0.0-preview.2"
#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 XiHan.Framework.Messaging.Abstractions@5.0.0-preview.2
#: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=XiHan.Framework.Messaging.Abstractions&version=5.0.0-preview.2&prerelease
#tool nuget:?package=XiHan.Framework.Messaging.Abstractions&version=5.0.0-preview.2&prerelease
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
XiHan.Framework.Messaging.Abstractions
关于
XiHan.Framework.Messaging.Abstractions 定义消息契约:CloudEvents 信封、发布者与代理接口、处理器订阅、经内核管道的派发、领域事件与事务性发件箱。不含代理实现,由内存、RabbitMQ、Kafka 提供程序提供。
主要特性
- CloudEvents 1.0 信封,租户、主体、关联、区域与追踪自动补齐
- 竞争订阅与广播订阅,失败重试后进死信
- 领域事件按主题批量发布
- 事务性发件箱,与业务写入同事务
如何使用
安装
dotnet add package XiHan.Framework.Messaging.Abstractions --prerelease
使用
一般由实现包带入;写处理器、发布消息或接入发件箱时直接使用:
builder.Services.AddMessageHandler<OrderPlacedHandler>("orders"); // 竞争:只有一个实例收到
builder.Services.AddMessageHandler<SessionRevokedHandler>("sessions.revoked", SubscriptionMode.Broadcast); // 广播:每个实例都收到
builder.AddXiHan(xihan => xihan
.UseStandardProfile()
.UseFeature<OutboxFeature>());
处理器返回失败或抛出异常都算投递失败,重试到 XiHan:Messaging:MaxAttempts(默认 3)后竞争订阅进死信。消息派发不写幂等键,去重由处理器按消息 ID 自理。
主要类型
此库提供的主要类型:
MessageEnvelope:CloudEvents 信封IMessagePublisher:发布入口,支持批量IMessageHandler、SubscriptionMode:处理器与订阅方式IMessageBroker:代理接口,提供程序实现它OutboxFeature、OutboxOptions:事务性发件箱
更多文档
相关包
- 内存实现:XiHan.Framework.Messaging.InMemory
- RabbitMQ 实现:XiHan.Framework.Messaging.RabbitMQ
- Kafka 实现:XiHan.Framework.Messaging.Kafka
- 一致性套件:XiHan.Framework.Messaging.Conformance
反馈与贡献
XiHan.Framework.Messaging.Abstractions 以 MIT 许可证 开源。欢迎到 GitHub 仓库 提交问题和贡献。
| Product | Versions 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.
-
net10.0
- Microsoft.Extensions.Caching.Abstractions (>= 10.0.14)
- Microsoft.Extensions.Configuration.Abstractions (>= 10.0.14)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.14)
- Microsoft.Extensions.Diagnostics.Abstractions (>= 10.0.14)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.14)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.14)
- Microsoft.Extensions.Options (>= 10.0.14)
- System.Threading.RateLimiting (>= 10.0.14)
- XiHan.Framework.Kernel (>= 5.0.0-preview.2)
- XiHan.Framework.Localization.Abstractions (>= 5.0.0-preview.2)
- XiHan.Framework.Persistence.Abstractions (>= 5.0.0-preview.2)
NuGet packages (11)
Showing the top 5 NuGet packages that depend on XiHan.Framework.Messaging.Abstractions:
| Package | Downloads |
|---|---|
|
XiHan.Framework.Workflow.Abstractions
曦寒框架工作流抽象包 |
|
|
XiHan.Framework.Scheduling.Abstractions
曦寒框架调度抽象包 |
|
|
XiHan.Framework.Plugins.Wasm
曦寒框架 Wasm 插件宿主 |
|
|
XiHan.Framework.Profiles.Standard
曦寒框架 Standard 组合包 |
|
|
XiHan.Framework.Plugins.Protocol
曦寒框架插件协议包 |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 5.0.0-preview.2 | 0 | 11/6/2026 |
| 5.0.0-preview.1 | 66 | 11/4/2026 |