Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

pull subscription undelivered messages are not redirected to dead letter topic

Hi,
I have a cloud run job that pulls messages from pull subscription, process and write to bigquery and will acknowledge the message if writing to bigquery is successful.
This job is scheduled to run every 15 min.
While writing to bigquery if the dataset/table doesn't exist it will throw an exception and we are not acknowledging the message.
 We have configured dead letter topic and set the maximum delivery attempts to 5.
However, when there is a bigquery exception the message is not redirected to Dead Letter topic even after 5 attempts.
So for every run we are getting same exception until the Subscription message retention duration is reached ( 7 days).

When we checked the delivery attempt using received_message.delivery_attempt it is always 1.

0 2 223
2 REPLIES 2

Hello,

Thank you for contacting the Google Cloud Community.

I have gone through your reported issue, however it seems like this is an issue observed specifically at your end. It would need more specific debugging and analysis. To ensure a faster resolution and dedicated support for your issue, I kindly request you to file a support ticket by clicking here[1]. Our support team will prioritize your request and provide you with the assistance you need.

For individual support issues, it is best to utilize the support ticketing system. We appreciate your cooperation!

[1]: https://cloud.google.com/support/docs/manage-cases#creating_cases

Regards,

Jai Ade

Hi,

Check Google managed google service account (service-{projectNumber}@gcp-sa-pubsub.iam.gserviceaccount.com) is available or not for your google project. 
Ideally it should be created when you enable PubSub services but I have seen sometimes it don't work as expected.

Once this is available in IAM we can give it below roles and that should fix the issue.

1) roles/pubsub.publisher
2) roles/pubsub.subscriber
3) roles/pubsub.serviceAgent