From edcf87ac4c39ff4f2e18e3d933a542eb30af8b50 Mon Sep 17 00:00:00 2001 From: zhangzhibiao Date: Tue, 23 Jun 2026 15:47:19 +0800 Subject: [PATCH 1/2] Clarify subscription properties behavior --- include/pulsar/ConsumerConfiguration.h | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/include/pulsar/ConsumerConfiguration.h b/include/pulsar/ConsumerConfiguration.h index ee0550c6..ff303a24 100644 --- a/include/pulsar/ConsumerConfiguration.h +++ b/include/pulsar/ConsumerConfiguration.h @@ -507,7 +507,7 @@ class PULSAR_PUBLIC ConsumerConfiguration { const std::string& getProperty(const std::string& name) const; /** - * Get all the properties attached to this producer. + * Get all the properties attached to this consumer. */ std::map& getProperties() const; @@ -524,14 +524,17 @@ class PULSAR_PUBLIC ConsumerConfiguration { ConsumerConfiguration& setProperties(const std::map& properties); /** - * Get all the subscription properties attached to this subscription. + * Get all the subscription properties configured for this consumer. */ std::map& getSubscriptionProperties() const; /** - * Sets a new subscription properties for this subscription. - * Notice: SubscriptionProperties are immutable, and consumers under the same subscription will fail to - * create a subscription if they use different properties. + * Set subscription properties to send when creating or attaching to a subscription. + * + * If the subscription does not exist, the broker stores these properties when + * the subscription is created. If the subscription already exists, these + * properties do not update the existing subscription properties and the client + * does not validate them against the broker-side properties. * * @param subscriptionProperties all the subscription properties in the provided map */ From 3c466d470132232fdd7454b4d977c4ef760fcec4 Mon Sep 17 00:00:00 2001 From: zhanglistar Date: Thu, 30 Jul 2026 17:17:16 +0800 Subject: [PATCH 2/2] Fix comment for getSubscriptionProperties method Corrected the comment to refer to subscription instead of consumer. --- include/pulsar/ConsumerConfiguration.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/pulsar/ConsumerConfiguration.h b/include/pulsar/ConsumerConfiguration.h index ff303a24..f781ed34 100644 --- a/include/pulsar/ConsumerConfiguration.h +++ b/include/pulsar/ConsumerConfiguration.h @@ -524,7 +524,7 @@ class PULSAR_PUBLIC ConsumerConfiguration { ConsumerConfiguration& setProperties(const std::map& properties); /** - * Get all the subscription properties configured for this consumer. + * Get all the subscription properties configured for this subscription. */ std::map& getSubscriptionProperties() const;