TCIS.EventBus
1.0.0-rc.10
dotnet add package TCIS.EventBus --version 1.0.0-rc.10
NuGet\Install-Package TCIS.EventBus -Version 1.0.0-rc.10
<PackageReference Include="TCIS.EventBus" Version="1.0.0-rc.10" />
<PackageVersion Include="TCIS.EventBus" Version="1.0.0-rc.10" />
<PackageReference Include="TCIS.EventBus" />
paket add TCIS.EventBus --version 1.0.0-rc.10
#r "nuget: TCIS.EventBus, 1.0.0-rc.10"
#:package TCIS.EventBus@1.0.0-rc.10
#addin nuget:?package=TCIS.EventBus&version=1.0.0-rc.10&prerelease
#tool nuget:?package=TCIS.EventBus&version=1.0.0-rc.10&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.10)
- TCIS.Logging.Abstractions (>= 1.0.0-rc.10)
NuGet packages (5)
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.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.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.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.10 | 0 | 7/24/2026 |
| 1.0.0-rc.9 | 47 | 7/21/2026 |
| 1.0.0-rc.8 | 48 | 7/21/2026 |
| 1.0.0-rc.7 | 72 | 7/17/2026 |
| 1.0.0-rc.6 | 79 | 7/7/2026 |
| 1.0.0-rc.5 | 84 | 7/7/2026 |
| 1.0.0-rc.4 | 87 | 6/24/2026 |
| 1.0.0-rc.2 | 86 | 5/12/2026 |
| 1.0.0-rc.1 | 90 | 5/12/2026 |