merlimat opened a new pull request, #218: URL: https://github.com/apache/pulsar-client-cpp/pull/218
### Motivation `Message` and `MessageId` are exposing `const std::string& getTopic()` method that returns a reference to an internal variable. If the consumer is destroyed the message & messageId object will become invalid and calling `getTopic()` will read an invalid memory location. The current situation is very error prone and can be a bigger problem when using regex subscription, since a topic can be deleted and the consumer will be closed in the background. ### Modifications Instead of keeping a `std::string&`, changed to use a `std::shared_ptr<std::string>` so that `Message` and `MessageId` instances will be valid regardless of the consumer. -- 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]
