BewareMyPower commented on code in PR #583:
URL: https://github.com/apache/pulsar-client-cpp/pull/583#discussion_r3331985055
##########
include/pulsar/Message.h:
##########
@@ -220,6 +220,14 @@ class PULSAR_PUBLIC Message {
*/
const std::string& getProducerName() const noexcept;
+ /**
+ * Get the source cluster from which the message was replicated.
+ *
+ * @return the optional pointer to the source cluster name if the message
was replicated, the pointer is
+ * valid as the Message instance is alive
+ */
+ std::optional<const std::string*> getReplicatedFrom() const;
Review Comment:
In modern C++, return an empty optional is better than return an empty
string.
--
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]