You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by bl...@apache.org on 2023/07/05 10:43:10 UTC
[pulsar-dotpulsar] branch release/2.11 updated: Feature/object pooling issue (#148) (#163)
This is an automated email from the ASF dual-hosted git repository.
blankensteiner pushed a commit to branch release/2.11
in repository https://gitbox.apache.org/repos/asf/pulsar-dotpulsar.git
The following commit(s) were added to refs/heads/release/2.11 by this push:
new 63b1dec Feature/object pooling issue (#148) (#163)
63b1dec is described below
commit 63b1decf7aa503d7f48e7731205237904c29a333
Author: Kristian Andersen <ka...@users.noreply.github.com>
AuthorDate: Wed Jul 5 12:43:05 2023 +0200
Feature/object pooling issue (#148) (#163)
* Reset sequenceId before returning to pool for reuse
All other fields will not be sent when using the Send Extension methods and should therefore not have a value that needs to be reset.
---
CHANGELOG.md | 6 ++++++
src/DotPulsar/Extensions/SendChannelExtensions.cs | 1 +
src/DotPulsar/Extensions/SendExtensions.cs | 1 +
3 files changed, 8 insertions(+)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 81c3a7e..3c6e337 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
+## [2.11.1] - 2023-07-05
+
+### Fixed
+
+- Fixed issue with `Send` extension methods that do include `MessageMetadata` in the parameter list. The issue prevents more than two messages from being published on namespaces where deduplication is enabled.
+
## [2.11.0] - 2023-03-13
### Added
diff --git a/src/DotPulsar/Extensions/SendChannelExtensions.cs b/src/DotPulsar/Extensions/SendChannelExtensions.cs
index 93ea2f1..046e18d 100644
--- a/src/DotPulsar/Extensions/SendChannelExtensions.cs
+++ b/src/DotPulsar/Extensions/SendChannelExtensions.cs
@@ -67,6 +67,7 @@ public static class SendChannelExtensions
async ValueTask ReleaseMetadataAndCallCallback(MessageId id)
{
+ metadata.Metadata.SequenceId = 0;
metadata.Metadata.Properties.Clear();
_messageMetadataPool.Return(metadata);
diff --git a/src/DotPulsar/Extensions/SendExtensions.cs b/src/DotPulsar/Extensions/SendExtensions.cs
index 00eef33..055b5fa 100644
--- a/src/DotPulsar/Extensions/SendExtensions.cs
+++ b/src/DotPulsar/Extensions/SendExtensions.cs
@@ -71,6 +71,7 @@ public static class SendExtensions
}
finally
{
+ metadata.Metadata.SequenceId = 0;
metadata.Metadata.Properties.Clear();
_messageMetadataPool.Return(metadata);
}