TCIS.EventBus
1.0.0-rc.14
See the version list below for details.
dotnet add package TCIS.EventBus --version 1.0.0-rc.14
NuGet\Install-Package TCIS.EventBus -Version 1.0.0-rc.14
<PackageReference Include="TCIS.EventBus" Version="1.0.0-rc.14" />
<PackageVersion Include="TCIS.EventBus" Version="1.0.0-rc.14" />
<PackageReference Include="TCIS.EventBus" />
paket add TCIS.EventBus --version 1.0.0-rc.14
#r "nuget: TCIS.EventBus, 1.0.0-rc.14"
#:package TCIS.EventBus@1.0.0-rc.14
#addin nuget:?package=TCIS.EventBus&version=1.0.0-rc.14&prerelease
#tool nuget:?package=TCIS.EventBus&version=1.0.0-rc.14&prerelease
TCIS.EventBus
The TCIS.EventBus library provides an Event Bus wrapper (based on DotNetCore.CAP) to standardize distributed event handling, message queuing, and the outbox pattern within the TCIS multi-tier application ecosystem (Microservices).
🌟 Features
- Publish/Subscribe: Easily send and receive events through distributed protocols.
- Outbox Pattern: Ensures data consistency when integrated with Entity Framework Core.
- Seamless Integration: Supports built-in Dependency Injection (DI) and automatic lifecycle management.
- High Extensibility: Supports multiple transport layers (Kafka, RabbitMQ, In-Memory) and storage layers (SQL Server, PostgreSQL, In-Memory).
📦 Installation
dotnet add package TCIS.EventBus
(Note: You also need to install the appropriate providers, such as TCIS.EventBus.Kafka and TCIS.EventBus.SqlServer)
🚀 Setup & Usage
1. Registration in Program.cs
Register TCIS.EventBus into the Service Collection using the AddTEventBus method:
builder.Services.AddTEventBus(options =>
{
// Register Storage (Example: InMemory)
options.UseInMemoryStorage();
// Register Transport (Example: Kafka)
options.UseKafka("localhost:9092");
// Configure advanced options
options.FailedRetryCount = 5;
});
2. Sending Events (Publisher)
Use IEventPublisher (which is automatically registered in DI):
public class OrderService
{
private readonly IEventPublisher _eventPublisher;
public OrderService(IEventPublisher eventPublisher)
{
_eventPublisher = eventPublisher;
}
public async Task CreateOrderAsync(Order order)
{
// ... processing logic
// Publish event
await _eventPublisher.PublishAsync("order.created", new { OrderId = order.Id, Amount = order.Amount });
}
}
3. Receiving Events (Subscriber)
Create a Subscriber class (must be registered as Transient or Singleton) and apply the [EventSubscribe] attribute:
public class OrderSubscriber : IEventSubscribe
{
[EventSubscribe("order.created")]
public async Task OnOrderCreated(OrderCreatedEvent eventData)
{
Console.WriteLine($"Received order creation event: {eventData.OrderId}");
await Task.CompletedTask;
}
}
⚙️ Configuration Options
The primary configuration settings can be adjusted within the EventBusOptions parameter:
| Property | Default | Description |
|---|---|---|
FailedRetryCount |
50 |
Maximum number of retry attempts upon event processing failure. |
FailedRetryInterval |
60 (s) |
Delay interval (in seconds) between retry attempts. |
SucceedMessageExpiredAfter |
24 * 3600 |
Expiration time (in seconds) to keep successfully processed messages in the database before deletion. |
| Product | Versions 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. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. 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. |
-
net8.0
- Microsoft.Extensions.Configuration.Abstractions (>= 9.0.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.0)
- Microsoft.Extensions.Hosting.Abstractions (>= 9.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 9.0.0)
- Microsoft.Extensions.Options (>= 9.0.0)
- TCIS.Core (>= 1.0.0-rc.14)
- TCIS.Logging.Abstractions (>= 1.0.0-rc.14)
NuGet packages (6)
Showing the top 5 NuGet packages that depend on TCIS.EventBus:
| Package | Downloads |
|---|---|
|
TCIS.EventBus.InMemoryStorage
TCIS Core Framework is an application framework for building modular, multi-tenant applications on ASP.NET Core. In-memory storage provider for TCIS Event Bus. |
|
|
TCIS.EventBus.Kafka
TCIS Core Framework is an application framework for building modular, multi-tenant applications on ASP.NET Core. Kafka provider for TCIS Event Bus. |
|
|
TCIS.EventBus.SqlServer
TCIS Core Framework is an application framework for building modular, multi-tenant applications on ASP.NET Core. SQL Server storage provider for TCIS Event Bus. |
|
|
TCIS.EventBus.PostgreSql
TCIS Core Framework is an application framework for building modular, multi-tenant applications on ASP.NET Core. PostgreSQL storage provider for TCIS Event Bus. |
|
|
TCIS.EventBus.RabbitMQ
TCIS Core Framework is an application framework for building modular, multi-tenant applications on ASP.NET Core. RabbitMQ provider for TCIS Event Bus. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0-rc.36 | 0 | 8/27/2026 |
| 1.0.0-rc.35 | 31 | 8/26/2026 |
| 1.0.0-rc.34 | 44 | 8/26/2026 |
| 1.0.0-rc.33 | 89 | 8/21/2026 |
| 1.0.0-rc.32 | 100 | 8/21/2026 |
| 1.0.0-rc.31 | 100 | 8/21/2026 |
| 1.0.0-rc.30 | 106 | 8/21/2026 |
| 1.0.0-rc.29 | 97 | 8/21/2026 |
| 1.0.0-rc.28 | 91 | 8/21/2026 |
| 1.0.0-rc.27 | 93 | 8/21/2026 |
| 1.0.0-rc.26 | 103 | 8/20/2026 |
| 1.0.0-rc.25 | 108 | 8/20/2026 |
| 1.0.0-rc.24 | 100 | 8/20/2026 |
| 1.0.0-rc.23 | 104 | 8/20/2026 |
| 1.0.0-rc.22 | 94 | 8/19/2026 |
| 1.0.0-rc.21 | 94 | 8/19/2026 |
| 1.0.0-rc.20 | 98 | 8/18/2026 |
| 1.0.0-rc.19 | 79 | 8/13/2026 |
| 1.0.0-rc.18 | 78 | 8/13/2026 |
| 1.0.0-rc.14 | 81 | 8/12/2026 |