question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

createSubscription("topic-name", ...).topic is undefined

See original GitHub issue

However createSubscription("topic-name", ...).metadata.topic contains the topic name

Environment details

Seen in the firebase emulator thing.

  • OS: Mac
  • Node.js version: v12.15.0
  • npm version: 6.13.4
  • @google-cloud/pubsub version: 2.1.0

Steps to reproduce

const sub = createSubscription("topicname", "subscriptionName", {
        pushEndpoint: `subscriber.com/api/mushroomFacts`,
})
sub.topic //undefined
sub.metadata.topic // projects/local-emulator/topics/topicname

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
stephenpluspluscommented, Aug 19, 2020

@psilospore Thanks, good to hear. I’ll close for now and let @feywind determine if there’s a bug we need to address.

0reactions
psilosporecommented, Aug 19, 2020

Sorry for getting back late. I did find another workaround to get the topic name when I reported this but thought it was a bug that might be worth reporting. Based on the previous comments it seems that it is a bug, but feel free to close this if you would like.

Thanks for the responses!

Read more comments on GitHub >

github_iconTop Results From Across the Web

[service-bus] topic subscription receives messages even with ...
While creating a subscription on a Topic Service Bus with many incoming messages ... createSubscription(topicName, subscriptionName,{status: ...
Read more >
Create and use subscriptions | Cloud Pub/Sub Documentation
Click Create subscription. For the Subscription ID field, enter a name. For information on how to name a subscription, see Guidelines to name...
Read more >
Pulling messages from Google PubSub not working
I haven't found a way to do this though and every example online does it the same way. TopicName topic = TopicName.create("cloud-project", "sn- ......
Read more >
pubsub - Go Packages
CreateSubscription creates a new subscription on a topic. id is the name of the subscription to create. It must start with a letter,...
Read more >
Check for Missing SNS Topic within Trail Configuration
Ensure that your CloudTrail trails are using active Amazon SNS topics. ... 5, select the Subscriptions tab, and choose Create subscription.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found