Pipelink.Outbox
1.0.12
See the version list below for details.
dotnet add package Pipelink.Outbox --version 1.0.12
NuGet\Install-Package Pipelink.Outbox -Version 1.0.12
<PackageReference Include="Pipelink.Outbox" Version="1.0.12" />
<PackageVersion Include="Pipelink.Outbox" Version="1.0.12" />
<PackageReference Include="Pipelink.Outbox" />
paket add Pipelink.Outbox --version 1.0.12
#r "nuget: Pipelink.Outbox, 1.0.12"
#:package Pipelink.Outbox@1.0.12
#addin nuget:?package=Pipelink.Outbox&version=1.0.12
#tool nuget:?package=Pipelink.Outbox&version=1.0.12
Pipelink.Outbox
A .NET library for implementing the outbox pattern with Entity Framework Core.
Overview
Pipelink.Outbox provides a simple and efficient way to implement the outbox pattern in your .NET applications using Entity Framework Core. The outbox pattern is a reliable way to handle message publishing in distributed systems, ensuring that messages are not lost even if the system fails.
Features
- Easy integration with Entity Framework Core
- Support for multiple message types
- Automatic message publishing
- Configurable retry policies
- Transactional message handling
Installation
dotnet add package Pipelink.Outbox
Quick Start
- Configure your DbContext:
public class YourDbContext : DbContext
{
public DbSet<OutboxMessage> OutboxMessages { get; set; }
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.ApplyConfiguration(new OutboxMessageConfiguration());
}
}
- Use the outbox in your services:
public class YourService
{
private readonly YourDbContext _context;
private readonly IOutboxPublisher _publisher;
public YourService(YourDbContext context, IOutboxPublisher publisher)
{
_context = context;
_publisher = publisher;
}
public async Task ProcessOrder(Order order)
{
using var transaction = await _context.Database.BeginTransactionAsync();
// Save your business data
_context.Orders.Add(order);
await _context.SaveChangesAsync();
// Add message to outbox
var message = new OutboxMessage
{
MessageType = "OrderCreated",
Payload = JsonSerializer.Serialize(order),
CreatedAt = DateTime.UtcNow
};
_context.OutboxMessages.Add(message);
await _context.SaveChangesAsync();
await transaction.CommitAsync();
}
}
- Configure the publisher in your startup:
services.AddOutboxPublisher(options =>
{
options.RetryCount = 3;
options.RetryInterval = TimeSpan.FromSeconds(5);
});
Configuration Options
RetryCount
: Number of retry attempts for failed messages (default: 3)RetryInterval
: Time between retry attempts (default: 5 seconds)BatchSize
: Number of messages to process in a single batch (default: 100)
License
This project is licensed under the MIT License - see the LICENSE file for details.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Support
If you encounter any issues or have questions, please open an issue on GitHub.
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.EntityFrameworkCore (>= 8.0.0)
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 | |
---|---|---|---|
1.0.20 | 156 | 4/22/2025 | |
1.0.19 | 237 | 4/22/2025 | |
1.0.18 | 235 | 4/22/2025 | |
1.0.17 | 258 | 4/22/2025 | |
1.0.16 | 245 | 4/22/2025 | |
1.0.15 | 252 | 4/22/2025 | |
1.0.14 | 269 | 4/22/2025 | |
1.0.13 | 254 | 4/22/2025 | |
1.0.12 | 255 | 4/22/2025 | |
1.0.11 | 262 | 4/22/2025 | |
1.0.10 | 257 | 4/22/2025 | |
1.0.9 | 259 | 4/22/2025 | |
1.0.7 | 262 | 4/22/2025 | |
1.0.6 | 251 | 4/22/2025 | |
1.0.5 | 266 | 4/22/2025 | |
1.0.4 | 255 | 4/22/2025 | |
1.0.3 | 254 | 4/22/2025 | |
1.0.2 | 257 | 4/22/2025 | |
1.0.1 | 257 | 4/22/2025 | |
1.0.0 | 262 | 4/22/2025 |