pubSubReceiver("example-project", "orders-subscription", "orders-topic", auth, data)
and bind it to streams_pubsub. The receiver fixes the subscription
and publish topic under https://pubsub.googleapis.com. Use a sealed bearer
token or OAuth2 with a sealed refresh token and Google’s
https://oauth2.googleapis.com/token endpoint. Grant the principal consume
rights on the subscription and publish rights on the topic. Use matching
labels and call
streams.pubsub.initialize({}). Use a fresh mount for a different
subscription or topic incarnation.
One REST pull returns at most one message. The app retains up to 16 KiB
of decoded body in a File and up to 4 KiB of attributes and other metadata.
The topic’s messageId identifies the event. The landing commit
retains the event and admits Acknowledge for the current ackId.
An expired acknowledgement can yield a redelivery with a new token.
Configure the subscription’s acknowledgement deadline to allow time for
the commit and dispatch. Invalid or oversized deliveries remain
unacknowledged. The subscription owns its delivery position and retention.
The app retains events when the remote delivery is settled or expires.
Call publish({ command, message }) to send a nonempty UTF-8 message of up
to 16 KiB. The host sends each task at most once. Repeating an identical
command recovers its retained disposition.
publishStatus({ command }) reports the provider-assigned message ID on
acceptance. An ambiguous send stays unknown.
See Pull
and Publish.