retry policy not working using emulator

188 views
Skip to first unread message

David Smith

unread,
Jan 26, 2022, 9:56:36 AM1/26/22
to pubsub-discuss
I've added a retry policy to my subscriptions using the python client and when I run the emulator I can see:

Created subscription: name: "projects/testproject/subscriptions/my_sub"
topic: "projects/testproject/topics/my_sub"
push_config {
}
ack_deadline_seconds: 10
message_retention_duration {
  seconds: 604800
}
enable_message_ordering: true
retry_policy {
  minimum_backoff {
    seconds: 2
  }
  maximum_backoff {
    seconds: 60
  }
}


However if I create a scenario where consuming a message fails and I get the error message:

Event handler failed for subscriber: the_sub[2c08ce42-d2f7-4d5f-8b37-38b015b93b92]. Nacking message

I would expect this to be replayed and the replaying backed off, however what actually happens is that the message is replayed but never backed off, the replay is just tried again and again in quick succession (many times per second). This does work in our production GCP setup however it makes development a real pain. This feature seems to be supported according to the pubsub emulator docs that I found. Can anyone help?

Kir Titievsky

unread,
Jan 26, 2022, 10:54:34 AM1/26/22
to David Smith, pubsub-discuss

David, Thanks for the email. This looks like a bug in the emulator. We are looking into it. 

--
You received this message because you are subscribed to the Google Groups "pubsub-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cloud-pubsub-dis...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cloud-pubsub-discuss/820fce08-fb60-4dcf-8fd8-68d39bb6f2a3n%40googlegroups.com.


--
Kir Titievsky | Product Manager | Google Cloud Pub/Sub 
Reply all
Reply to author
Forward
0 new messages