Skip to content

createTopic vs topic can be confusing? #669

Description

@jgeewax

Right now, to "create a topic", people jump immediately to createTopic -- which gives them back a topic, but then the second time they try to create a topic, it'll cause problems, right? What people typically want in their code is topic() with {autoCreate: true} ...

So... a couple options

  1. Remove / privatize createTopic (why create a topic to not use it...?)
  2. Document in createTopic that you probably want topic()
    1. and update topic()'s options to auto-create by default

Thoughts?

Activity

  1. stephenplusplus commented on Jun 22, 2015

    @stephenplusplus
    Contributor

    I like privatizing createTopic and autocreating by default. RE: "(why create a topic to not use it...?)", should we loop in a Pub/Sub-er to see if we should continue to support that?

  2. jgeewax commented on Jun 22, 2015

    @jgeewax
    ContributorAuthor

    Hmm -- I think we're still pretty early, so it's not crazy to deprecate the method, and the "full deprecation" being that it's not longer in the docs. Thoughts?

  3. stephenplusplus commented on Jun 22, 2015

    @stephenplusplus
    Contributor

    SGTM.

  4. added a commit that references this issue on Feb 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

api: pubsubIssues related to the Pub/Sub API.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions