From a26777ca21a66e50da4828db9359d581749ba318 Mon Sep 17 00:00:00 2001 From: Anatolii Hrynchuk Date: Sat, 3 Oct 2026 00:56:29 +0300 Subject: [PATCH] chore: preserve current workspace changes Save pending configuration, deployment, and documentation work. --- Hrynco.RabbitMq/Hrynco.RabbitMq.csproj | 54 ++++++++++---------- Hrynco.RabbitMq/README.md | 70 +++++++++++++------------- 2 files changed, 63 insertions(+), 61 deletions(-) diff --git a/Hrynco.RabbitMq/Hrynco.RabbitMq.csproj b/Hrynco.RabbitMq/Hrynco.RabbitMq.csproj index 6c3cb30..ffb4e6c 100644 --- a/Hrynco.RabbitMq/Hrynco.RabbitMq.csproj +++ b/Hrynco.RabbitMq/Hrynco.RabbitMq.csproj @@ -1,27 +1,27 @@ - - - - net10.0 - disable - enable - Hrynco.RabbitMq - HrynCo.RabbitMq - HrynCo - RabbitMQ publisher and consumer base for HrynCo applications. - hrynco rabbitmq messaging - git - https://gitea.grynco.com.ua/hrynco/hrynco-rabbitmq.git - README.md - - - - - - - - - - - - - + + + + net10.0 + disable + enable + Hrynco.RabbitMq + HrynCo.RabbitMq + HrynCo + RabbitMQ publisher and consumer base for HrynCo applications. + hrynco rabbitmq messaging + git + https://gitea.hrynco.com/hrynco/hrynco-rabbitmq.git + README.md + + + + + + + + + + + + + diff --git a/Hrynco.RabbitMq/README.md b/Hrynco.RabbitMq/README.md index 20ec8a3..53b1917 100644 --- a/Hrynco.RabbitMq/README.md +++ b/Hrynco.RabbitMq/README.md @@ -1,34 +1,36 @@ -# HrynCo.RabbitMq - -RabbitMQ publisher and consumer base for HrynCo applications. - -## Contents - -- `RabbitMqSettings` — connection settings record (host, port, user, password, virtual host) -- `IRabbitMqPublisher` / `RabbitMqPublisher` — publishes JSON-serialized messages to a named queue -- `RabbitMqConsumerBase` — background service base with connection management, manual ACK/NACK, retry, permanent-validation rejection, and backward-compatible context-aware handling -- `RabbitMqMessageContext` — neutral AMQP delivery metadata (`MessageId`, type, correlation, routing, headers, and redelivery state) -- `IRabbitMqMessage` — message contract interface -- `CorrelationContext` — correlation ID carrier - -## Packaging - -This package is intended for reuse through NuGet. The test project is excluded from packing. - -## Consumer extension points - -Existing consumers can keep overriding `HandleMessageAsync(message, cancellationToken)`. -Consumers that need AMQP metadata can instead override -`HandleMessageAsync(message, context, cancellationToken)`. The base class retains -ownership of acknowledgements and retries. - -Override `TryValidateMessage(...)` for application-specific permanent validation. -Returning `false` nacks the delivery without requeue before retry processing begins. -Keep validation errors free of credentials and sensitive payload values. - -Override `HandleMessageRetriesExhaustedAsync(...)` when a consumer must react once to a -terminal processing failure, for example by publishing a neutral failure result to the -requesting client. The hook runs after the final handler exception and before the original -delivery is nacked without requeue. Hook failures are logged and do not replace the -original failure or acknowledgement policy. Application shutdown cancellation does not -invoke the hook. +# HrynCo.RabbitMq + +RabbitMQ publisher and consumer base for HrynCo applications. + +## Contents + +- `RabbitMqSettings` — connection settings record (host, port, user, password, virtual host) +- `IRabbitMqPublisher` / `RabbitMqPublisher` — publishes JSON-serialized messages to a named queue +- `RabbitMqConsumerBase` — background service base with connection management, manual ACK/NACK, retry, permanent-validation rejection, and backward-compatible context-aware handling +- `RabbitMqMessageContext` — neutral AMQP delivery metadata (`MessageId`, type, correlation, routing, headers, and redelivery state) +- `IRabbitMqMessage` — message contract interface +- `CorrelationContext` — correlation ID carrier + +## Packaging + +This package is intended for reuse through NuGet. The test project is excluded from packing. + +## Consumer extension points + +Existing consumers can keep overriding `HandleMessageAsync(message, cancellationToken)`. +Consumers that need AMQP metadata can instead override +`HandleMessageAsync(message, context, cancellationToken)`. The base class retains +ownership of acknowledgements and retries. + +Override `TryValidateMessage(...)` for application-specific permanent validation. +Returning `false` nacks the delivery without requeue before retry processing begins. +Keep validation errors free of credentials and sensitive payload values. + +Override `HandleMessageRetriesExhaustedAsync(...)` when a consumer must react once to a +terminal processing failure, for example by publishing a neutral failure result to the +requesting client. The hook runs after the final handler exception and before the original +delivery is nacked without requeue. Hook failures are logged and do not replace the +original failure or acknowledgement policy. Application shutdown cancellation does not +invoke the hook. + +Package repository metadata points to [HrynCo.RabbitMq on Gitea](https://gitea.hrynco.com/hrynco/hrynco-rabbitmq). The hostname change does not alter package versions or messaging behavior.