rele icon indicating copy to clipboard operation
rele copied to clipboard

Track failed published messages

Open antoniobusrod opened this issue 3 years ago • 1 comments

It would be nice to track the exceptions which happen when it is not possible to publish a message, for example, when there is a connectivity problem.

At the moment, there is the post_publish_failure middleware which is called when there is a timeout error (google.cloud.pubsub_v1.exceptions.TimeoutError, but it would not be called for any other error like google.api_core.exceptions.RetryError.

It would be nice to consider the possibility to track these messages through the existing post_publish_failure middleware or new middleware.

antoniobusrod avatar Mar 25 '21 16:03 antoniobusrod

Sounds like a great idea @antoniobusrod ! To take some inspiration from others, we can look at the way Dramatiq handles this here

andrewgy8 avatar Mar 26 '21 08:03 andrewgy8