-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Labels
api: pubsubIssues related to the Pub/Sub API.Issues related to the Pub/Sub API.type: questionRequest for information or clarification. Not an issue.Request for information or clarification. Not an issue.
Description
Is your feature request related to a problem? Please describe.
Hi,
I have a simple publish for loop:
for message in data:
future = publisher.publish(topic_path, data=message)
future.add_done_callback(self.get_callback(future, message))
with some callback (-> I don't wait until the future is returned). The problem is that when the last batch of data is being created, the process terminates earlier than it's being sent (<MAX_LATENCY), missing some last messages.
Could there be a way of something like publisher.join() or publisher.force_push() to make sure that all messages are sent before the process terminates?
Related:
Metadata
Metadata
Assignees
Labels
api: pubsubIssues related to the Pub/Sub API.Issues related to the Pub/Sub API.type: questionRequest for information or clarification. Not an issue.Request for information or clarification. Not an issue.