HAGI.Robust 1.1.0

dotnet add package HAGI.Robust --version 1.1.0
                    
NuGet\Install-Package HAGI.Robust -Version 1.1.0
                    
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="HAGI.Robust" Version="1.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="HAGI.Robust" Version="1.1.0" />
                    
Directory.Packages.props
<PackageReference Include="HAGI.Robust" />
                    
Project file
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 HAGI.Robust --version 1.1.0
                    
#r "nuget: HAGI.Robust, 1.1.0"
                    
#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 HAGI.Robust@1.1.0
                    
#: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=HAGI.Robust&version=1.1.0
                    
Install as a Cake Addin
#tool nuget:?package=HAGI.Robust&version=1.1.0
                    
Install as a Cake Tool

HAGI.Robust

A shared resilience toolkit for HAGI microservices supporting both web applications and console applications.

Features

  • Polly Retry (1-3-9s) + Circuit Breaker
  • Timeout policy
  • Health and Readiness endpoints (web apps)
  • Dependency Waiter (RabbitMQ, Redis, HTTP, TCP)
  • ILogger integration
  • Standalone mode for console apps
  • Integrated mode for web apps

Usage

Standalone Mode (Console Apps)

Simple 3-line integration for console applications:

using Hagi.Robust;
using Hagi.Robust.Probes;

Console.WriteLine("Starting ChatService...");

// Wait for RabbitMQ to be ready
var rabbitProbe = new RabbitMqProbe("rabbitmq", 5672);
await HagiRobust.WaitForDependenciesAsync(new[] { rabbitProbe });

Console.WriteLine("RabbitMQ is ready! Starting service...");
// Continue with your application logic

Available probes:

  • RabbitMqProbe(host, port) - RabbitMQ connection
  • RedisProbe(host, port) - Redis connection
  • HttpProbe(url) - HTTP endpoint availability
  • TcpProbe(host, port) - Generic TCP port check

Multiple dependencies:

var probes = new IStartupProbe[]
{
    new RabbitMqProbe("rabbitmq", 5672),
    new RedisProbe("redis", 6379),
    new HttpProbe("http://authservice:8080/health")
};

await HagiRobust.WaitForDependenciesAsync(probes);

Integrated Mode (Web Apps)

Full integration with ASP.NET Core health endpoints:

using Hagi.Robust;
using Hagi.Robust.Probes;

var builder = WebApplication.CreateBuilder(args);

builder.Services.AddHagiResilience();
builder.Services.AddSingleton<IStartupProbe>(sp => new RabbitMqProbe("rabbitmq", 5672));

var app = builder.Build();
app.MapReadinessEndpoint();  // Creates endpoint at /health/ready
app.Run();

Installation

dotnet add package HAGI.Robust --version 1.1.0

Or from GitHub Packages:

dotnet add package HAGI.Robust --source https://nuget.pkg.github.com/MTBonde/index.json --version 1.1.0

Repository

https://github.com/MTBonde/HAGI.Robust

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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.1.0 202 10/29/2025
1.0.0 377 10/29/2025