Skip to content

Simplify google-cloud-pubsub client creation #4282

@suzmue

Description

@suzmue

To simplify client creation for the publisher, we want to allow users to be able to create a Publisher directly without creating a Client first.

let publisher = pubsub::client::Publisher::builder(topic_name).build().await?;
// ready to start publishing

We will accomplish this by

  1. Renaming Client -> BasePublisher
  2. Renaming PublisherBuilder -> PublisherPartialBuilder
  3. Adding a new builder() to Publisher that configures client and batching configuration.
  4. Moving BasePublisher to a publisher module as an advanced use case.

Metadata

Metadata

Assignees

Labels

api: pubsubIssues related to the Pub/Sub API.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions