1
votes

I recently started receiving the following error when publishing to a Pub/Sub when invoked within a Cloud Function (note I cannot replicate this error locally):

> AuthMetadataPluginCallback "<google.auth.transport.grpc.AuthMetadataPlugin object at 0x3e533b442910>" raised exception!
> ...
> requests.exceptions.ConnectionError: ('Connection aborted.', BrokenPipeError(32, 'Broken pipe'))

I have not changed anything in the way I publish topics and am following the Google documentation:

message_future = publisher.publish(topic_path, data=params_bytes)

Any thoughts on why this is happening?


Here are some additional logs:

enter image description here

1
Are you hitting this error every time or is it transient? In the second case I feel that this may happen due to some pub/sub quota exhaustion. Otherwise please share a simplified reproducible example. Also check if you are using latest library versions.Emil Gi

1 Answers

0
votes

can you try future.result() instead of any callbacks you added in case? Let me know how it goes it actually fixed the issue. Again, it might make the pipeline synchronous.