Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(pubsub): add delivery attempt property to message object received by user code #10205

Merged
merged 3 commits into from Jan 30, 2020

Conversation

@pradn
Copy link
Contributor

@pradn pradn commented Jan 24, 2020

  • Exposes the delivery-attempt counter for a message.
  • Add tests for plumbing + message property.
  • In the future, we should modify the system test test_creating_subscriptions_with_non_default_settings or create a new one to test setting a dead letter policy on a subscription. Such a modification would make the test fail now since DLQ isn't enabled for all projects. (Only a DLQ-enabled project would pass the modified test.)

Fixes #10161

@pradn pradn requested review from anguillanneuf and plamut as code owners Jan 24, 2020
@pradn pradn requested a review from maheshgattani Jan 24, 2020
Copy link
Contributor

@plamut plamut left a comment

The change looks good, with the same thought on maybe returning None if delivery attempt is not applicable for a particular message.

Oh, and the commit message to make the linter happy. :)

Loading

@pradn pradn removed the request for review from anguillanneuf Jan 30, 2020
plamut
plamut approved these changes Jan 30, 2020
Copy link
Contributor

@plamut plamut left a comment

LGTM

Loading

pubsub/google/cloud/pubsub_v1/subscriber/message.py Outdated Show resolved Hide resolved
Loading
@pradn pradn merged commit c3b9327 into googleapis:master Jan 30, 2020
51 of 52 checks passed
Loading
@pradn pradn deleted the dlq branch Jan 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

4 participants