-
Notifications
You must be signed in to change notification settings - Fork 4
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
[IA-2355] support maxRetry #372
Conversation
## 0.16 | ||
|
||
Changed: | ||
- Add `subscriptionName: Option[ProjectSubscriptionName]` and `deadLetterPolicy: Option[SubscriberDeadLetterPolicy]` to `SubscriberConfig` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just curious - since these are optional could it be a non-breaking change if they default to None
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah yea, I guess (I'm not entirely sure by providing default is backward compatible since I vaguely remember I had to fix things after a PR that added optional param with default...)...I tend to not giving default just so caller have to think about these options. But I'm happy to give default here..also This has more points on why providing defaults can be bad
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I don't love defaults either, was just curious. I don't really have a strong preference, will thumb as is :)
} | ||
traceId = Option(message.getAttributesMap.get("traceId")).map(s => TraceId(s)) | ||
} yield Event(msg, traceId, message.getPublishTime, consumer) | ||
|
||
val loggingCtx = Map( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this context not useful to log, or is it logged in another way?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
when we log the PubsubMessage
in the message, these context are already being logged. So it's a bit duplicate
support optional subscriber name and optional
deadLetterPolicy
Tested in console:
After 5 retries, msg is forwarded to dead letter topic that I configed, I see the nacked message as expected.
PR checklist
If you're doing a major or minor version bump to any libraries:
project/Settings.scala
createVersion()
CHANGELOG.md
for those libraries@deprecated
instead of deleting code where possibleIn all cases:
README.md
and theCHANGELOG.md
for any libs you changed withTRAVIS-REPLACE-ME
to auto-update the version string