Axum.MasunoIntegrationsLibrary
1.0.2
dotnet add package Axum.MasunoIntegrationsLibrary --version 1.0.2
NuGet\Install-Package Axum.MasunoIntegrationsLibrary -Version 1.0.2
<PackageReference Include="Axum.MasunoIntegrationsLibrary" Version="1.0.2" />
<PackageVersion Include="Axum.MasunoIntegrationsLibrary" Version="1.0.2" />
<PackageReference Include="Axum.MasunoIntegrationsLibrary" />
paket add Axum.MasunoIntegrationsLibrary --version 1.0.2
#r "nuget: Axum.MasunoIntegrationsLibrary, 1.0.2"
#:package Axum.MasunoIntegrationsLibrary@1.0.2
#addin nuget:?package=Axum.MasunoIntegrationsLibrary&version=1.0.2
#tool nuget:?package=Axum.MasunoIntegrationsLibrary&version=1.0.2
MasunoIntegrationsLibrary
A .NET Core 3.1 library that provides event stream forwarding capabilities for integrating Axum/DPlus systems with Masuno integrations. This library acts as an event forwarder, processing various business events and forwarding them to external Masuno integration endpoints.
Overview
The MasunoIntegrationsLibrary is designed to handle real-time event streaming between different business systems (Chess, Orders360, Planning Web, and Productivity) and forward these events to Masuno integrations for further processing. It uses an event-driven architecture with stream consumers that filter, validate, and forward relevant events.
Architecture
The library follows a Event Forwarder pattern where each consumer:
- Filters Events: Determines which events should be processed based on business rules
- Validates Context: Ensures the organization and settings are appropriate for processing
- Forwards Events: Sends filtered events to the Masuno integrations API
- Handles Failures: Manages retry logic and failure scenarios
Configuration
Required Settings
{
"MasunoIntegrationsEndpoint": "https://your-masuno-endpoint.com",
"MasunoIntegrationsToken": "your-authorization-token",
"AxumCentralMasunoTenantsCodes": "tenant1,tenant2,tenant3"
}
Dependency Injection Setup
//Use the extension method
MasunoIntegrationsLibrary.StartupServicesConfig.ConfigureServices(services, configuration, false);
Event Flow
- Event Generation: Business systems generate events (orders, invoices, CICO, etc.)
- Stream Processing: Consumers receive events in batches
- Filtering: Each consumer applies business rules to determine relevance
- Validation: Organization settings and permissions are checked
- Forwarding: Valid events are forwarded to Masuno integrations
- Retry Logic: Failed events are retried according to consumer configuration
- Error Handling: Events that fail all retries are handled appropriately
Error Handling
The library implements robust error handling:
- Retry Mechanism: Configurable retry attempts per consumer
- Failure Behaviors:
Continue
: Process next events despite failuresStop
: Halt processing on persistent failures
- Logging: Comprehensive logging for troubleshooting
- Circuit Breaker: Prevents cascade failures
Monitoring
Key Metrics
- Event processing rates per consumer
- Retry counts and failure rates
- API response times to Masuno endpoints
- Organization-specific processing volumes
Logging
The library provides structured logging for:
- Event processing steps
- API call results
- Error conditions
- Performance metrics
Dependencies
- .NET Core 3.1
- Axum.Common (v1.1.15): Core Axum functionality
- AxumConnectorCommon (v1.1.21): Connector utilities and models
- Refit: HTTP API client
- Newtonsoft.Json: JSON serialization
- LazyCache: Caching infrastructure
Usage Example
// Configure services
public void ConfigureServices(IServiceCollection services)
{
MasunoIntegrationsLibrary.StartupServicesConfig.ConfigureServices(
services, Configuration, false);
// Register consumers
services.AddScoped<ChessOrdersConsumerForwarder>();
services.AddScoped<Orders360PedidosConsumer>();
// ... other consumers
}
// Use in stream processing
var consumer = serviceProvider.GetService<Orders360PedidosConsumer>();
var events = GetEventsFromStream();
consumer.Consume(events);
Contributing
When adding new consumers:
- Extend
EventHookSenderConsumer
- Implement required abstract methods
- Add appropriate filtering in
ShouldHandle()
- Use
IMasunoIntegrationsStreamingApi
for forwarding - Add consumer to
MasunoIntegrationsConsumers
enum - Configure appropriate retry and timing settings
License
This project is part of the Greencode LLC ecosystem and follows the same licensing terms.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. 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. |
.NET Core | netcoreapp3.1 is compatible. |
-
.NETCoreApp 3.1
- Axum.Common (>= 1.1.15)
- AxumConnectorCommon (>= 1.1.21)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.