zhaijack commented on a change in pull request #1996: Cpp client: add
multiTopicsConsumer
URL: https://github.com/apache/incubator-pulsar/pull/1996#discussion_r197172461
##########
File path: pulsar-client-cpp/include/pulsar/Message.h
##########
@@ -46,6 +46,16 @@ class Message {
Message();
+ /**
+ * Only for MultiTopicsConsumer to get a valid topicName
+ */
+ std::string& getTopicName() const;
Review comment:
Thanks @merlimat. Currently, as you suggested, move set/getTopicName into
private. Is it enough? e.g. single `ConsumerImpl` could call these 2 methods,
but It is not useful at all, maybe no developer will use it inside
`ComsumerImpl`.
Or we could use [this
way](https://stackoverflow.com/questions/3220009/is-this-key-oriented-access-protection-pattern-a-known-idiom)
to make set/getTopicName only available to MultiTopicsConsumer?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services