From a00b438e6e838af9d91ceb06fb79b54e02c3c7c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Novais?= <76997461+josenovais@users.noreply.github.com> Date: Tue, 28 Dec 2021 19:51:12 +0000 Subject: [PATCH] version 2.3.4 --- JN.RabbitMQClient/JN.RabbitMQClient.csproj | 6 +++--- JN.RabbitMQClient/JN.RabbitMQClient.nuspec | 14 +++++++++----- JN.RabbitMQClient/Other/RabbitMqUtilities.cs | 4 +--- JN.RabbitMQClient/RabbitMqConsumerService.cs | 2 +- README.md | 2 +- 5 files changed, 15 insertions(+), 13 deletions(-) diff --git a/JN.RabbitMQClient/JN.RabbitMQClient.csproj b/JN.RabbitMQClient/JN.RabbitMQClient.csproj index 20b9620..8bd0c49 100644 --- a/JN.RabbitMQClient/JN.RabbitMQClient.csproj +++ b/JN.RabbitMQClient/JN.RabbitMQClient.csproj @@ -8,9 +8,9 @@ https://github.com/jlnovais/JN.RabbitMQClient José Novais, 2021 JN.RabbitMQClient - Simple RabbitMQ client - 2.3.3 - 2.3.3 - 2.3.3 + 2.3.4 + 2.3.4 + 2.3.4 packageIcon.png diff --git a/JN.RabbitMQClient/JN.RabbitMQClient.nuspec b/JN.RabbitMQClient/JN.RabbitMQClient.nuspec index d9f0700..06dfb12 100644 --- a/JN.RabbitMQClient/JN.RabbitMQClient.nuspec +++ b/JN.RabbitMQClient/JN.RabbitMQClient.nuspec @@ -2,7 +2,7 @@ JN.RabbitMQClient - 2.3.3 + 2.3.4 José Novais José Novais false @@ -16,18 +16,22 @@ Simple implementation of RabbitMQ consumer and sender. Simple implementation of RabbitMQ consumer and sender. José Novais, 2021 - - Release Notes for current version: + + Release Notes for current version (2.3.4): + + - Added support for additional information to be passed to the processing delegate; the processing instruction is now an object 'MessageProcessInstruction' where that additional information can be passed. Useful for when a message is requeued with delay to pass information to the next processing attempt. + + Release Notes for version 2.3.3: - Update target frameworks; added .NETFramework4.6.1 - Update RabbitMQ.Client to latest version - Update consumer to expose MaxChannelsPerConnection property - Release Notes for previous version: + Release Notes for version 2.3.2: - Added sender service that keeps connection open. - Release Notes for other previous version: + Release Notes for version 2.3.0: - Update RabbitMQ.Client to latest version - Changed namespace for IRabbitMqConsumerService and IRabbitMqSenderService diff --git a/JN.RabbitMQClient/Other/RabbitMqUtilities.cs b/JN.RabbitMQClient/Other/RabbitMqUtilities.cs index fc5a2e5..8e2d4c6 100644 --- a/JN.RabbitMQClient/Other/RabbitMqUtilities.cs +++ b/JN.RabbitMQClient/Other/RabbitMqUtilities.cs @@ -29,8 +29,6 @@ internal static long GetFirstErrorTimeStampFromMessageArgs(IBasicProperties prop internal static string GetAdditionalInfoFromMessageArgs(IBasicProperties properties) { - string res = null; - if (properties?.Headers == null) return null; @@ -41,7 +39,7 @@ internal static string GetAdditionalInfoFromMessageArgs(IBasicProperties propert return null; var value = (byte[]) properties.Headers[Constants.MessageAdditionalInfoHeaderName]; - res = Encoding.UTF8.GetString(value); + var res = Encoding.UTF8.GetString(value); return res; } diff --git a/JN.RabbitMQClient/RabbitMqConsumerService.cs b/JN.RabbitMQClient/RabbitMqConsumerService.cs index eb13c12..e658ecd 100644 --- a/JN.RabbitMQClient/RabbitMqConsumerService.cs +++ b/JN.RabbitMQClient/RabbitMqConsumerService.cs @@ -318,7 +318,7 @@ private async Task GetMessageProcessInstruction(strin isAllowed = Limiter.IsAllowed(routingKeyOrQueueName, consumerTag, firstErrorTimestamp, exchange, message); if (!isAllowed) - return new MessageProcessInstruction {Value = Limiter.DeniedProcessInstruction}; + return new MessageProcessInstruction(Limiter.DeniedProcessInstruction, messageAdditionalInfo); var messageProcessInstruction = await OnReceiveMessage(routingKeyOrQueueName, consumerTag, firstErrorTimestamp, exchange, message, messageAdditionalInfo) diff --git a/README.md b/README.md index a5ec4ed..496b837 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ Simple implementation of RabbitMQ consumer and sender. * Multiple processing options for received messages * Random expiration for messages sent to an holding queue (depending on the processing option) * TLS connection support -* [Limiter for message processing](https://josenovais.azurewebsites.net/JN-RabbitMQClient/#limiter) +* [Limiter for message processing](https://jn-rabbitmqclient.josenovais.com/#limiter) More details available on the [project website](https://jn-rabbitmqclient.josenovais.com/).