Google::Cloud::PubSub::ReceivedMessage#subscription
returns both subscription and stream
#22438
Labels
priority: p3
Desirable enhancement or fix. May not be included in next release.
type: feature request
‘Nice-to-have’ improvement, new feature or different behavior or design.
If you receive a message via streaming pull,
ReceivedMessage#subscription
returns the subscriber stream, meaning that if you want to grab the subscription name from it you have to do something like:But if you use the regular pull operation or the
wait_for_messages
method,ReceivedMessage#subscription
now returns the actual subscription, meaning that the previous line crashes since subscription does not have a subscriber.Is it possible that both return a subscription? So the streaming pull instead of returning a stream it returns a subscription as the name suggests.
The text was updated successfully, but these errors were encountered: