From edcf87ac4c39ff4f2e18e3d933a542eb30af8b50 Mon Sep 17 00:00:00 2001 From: zhangzhibiao Date: Tue, 23 Jun 2026 15:47:19 +0800 Subject: [PATCH] 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 */