Skip to content

createTopic vs topic can be confusing? #669

Closed
@jgeewax

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?

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