BewareMyPower commented on code in PR #15020:
URL: https://github.com/apache/pulsar/pull/15020#discussion_r842840849
##########
pulsar-client-cpp/lib/ConsumerConfiguration.cc:
##########
@@ -214,6 +214,19 @@ ConsumerConfiguration&
ConsumerConfiguration::setProperties(
return *this;
}
+std::map<std::string, std::string>&
ConsumerConfiguration::getSubscriptionProperties() const {
+ return impl_->subscriptionProperties;
+}
+
+ConsumerConfiguration& ConsumerConfiguration::setSubscriptionProperties(
+ const std::map<std::string, std::string>& subscriptionProperties) {
+ for (std::map<std::string, std::string>::const_iterator it =
subscriptionProperties.begin();
+ it != subscriptionProperties.end(); it++) {
+ impl_->subscriptionProperties.insert(std::make_pair(it->first,
it->second));
+ }
+ return *this;
Review Comment:
It's similar to my previous comment. For new code, use range-based for loop
and the `emplace` method.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]