diff --git a/changelog.md b/changelog.md index 6715320..c380e03 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,9 @@ # Changelog +## [5.2.0] - 2026-05-19 +### *Changes* +- Make JsonMessageHandler.HandleAsync(T, headers, ct) public instead of protected, allowing consuming applications to unit test their handler implementations directly with typed payloads rather than having to construct serialised Message objects + ## [5.1.0] - 2026-05-18 ### *Changes* - Add JsonMessageHandler abstract base class for type-safe message consumption with automatic JSON deserialization diff --git a/src/JsonMessageHandler.cs b/src/JsonMessageHandler.cs index ecfc6fc..3656651 100644 --- a/src/JsonMessageHandler.cs +++ b/src/JsonMessageHandler.cs @@ -14,7 +14,7 @@ public async Task HandleAsync(Message message, CancellationToken cancellationTok await HandleAsync(payload, message.Headers, cancellationToken); } - protected abstract Task HandleAsync( + public abstract Task HandleAsync( T payload, IReadOnlyDictionary headers, CancellationToken cancellationToken); diff --git a/src/Linn.Common.Messaging.RabbitMQ.csproj b/src/Linn.Common.Messaging.RabbitMQ.csproj index 5d7ade0..6b37234 100644 --- a/src/Linn.Common.Messaging.RabbitMQ.csproj +++ b/src/Linn.Common.Messaging.RabbitMQ.csproj @@ -5,7 +5,7 @@ enable Linn.Common.Messaging.RabbitMQ Linn.Common.Messaging.RabbitMQ - 5.1.0 + 5.2.0 enable