Skip to content

PubSub Publisher documentation missing options documentation #2565

@lc-chrisbarton

Description

@lc-chrisbarton

For a Cloud Function I need to immediately publish and so I assume I need to set maxMessages=1 and maxMilliseconds=0 when calling pubsub.topic(...).publisher({ batching: { maxMessages: 1, maxMilliseconds: 0 } }) but this is not documented and I needed to look at the source (which was fine but I hope I have made the correct assumption about how to setup immediate send):

https://googlecloudplatform.github.io/google-cloud-node/#/docs/pubsub/0.14.0/pubsub/publisher?method=Publisher

The documentation is available on the topic though:
https://googlecloudplatform.github.io/google-cloud-node/#/docs/pubsub/0.14.0/pubsub/topic?method=publisher

https://github.com/GoogleCloudPlatform/google-cloud-node/blob/pubsub-0.14.0/packages/pubsub/src/topic.js

  • @param {number} options.batching.maxMessages - The maximum number of messages
  • to buffer before sending a payload.
    
  • @param {number} options.batching.maxMilliseconds - The maximum duration to
  • wait before sending a payload.
    

Metadata

Metadata

Assignees

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