Add jittered backoff and dead-letter fields to PulsarConfig - #5087
Add jittered backoff and dead-letter fields to PulsarConfig#5087mauriceyap wants to merge 2 commits into
Conversation
Greptile SummaryExtends Pulsar configuration for future retry and dead-letter handling.
Confidence Score: 4/5The PR is not yet safe to merge because normal startup validation still accepts a maximum backoff shorter than the initial backoff. The omitted dead-letter attempt count is now accepted through the omitempty constraint, but the previously reported nested-validation issue remains: production parent validators call validate.Struct and never invoke PulsarConfig.Validate, while the new tests exercise that method only directly. Files Needing Attention: internal/common/config/pulsar.go, internal/common/config/pulsar_test.go
|
| Filename | Overview |
|---|---|
| internal/common/config/pulsar.go | Adds retry and dead-letter configuration fields, but the new cross-field validator remains disconnected from production configuration validation. |
| internal/common/config/pulsar_test.go | Covers field-tag behavior and direct cross-field validation, but not validation through a production parent configuration. |
Reviews (5): Last reviewed commit: "comment" | Re-trigger Greptile
|
|
Tick the box to add this pull request to the merge queue (same as
|
48009aa to
1c0eedc
Compare
|
@greptile-apps we will use the |
|
Thanks for the context — that makes sense for a stacked PR workflow. The concern about |
1c0eedc to
b34cc32
Compare
b34cc32 to
fcfe5cd
Compare
This extends `PulsarConfig` with `MaxBackoffTime`, `BackoffRandomizationFactor`, `BackoffMultiplier`, `DeadLetterTopic`, and `DeadLetterMaxAttempts` (validated `gte=2`), plus a `Validate()` method checking `MaxBackoffTime >= BackoffTime`. Note this is a pure config struct change for now - there is no consumer of these fields yet. In a future PR, I will use `cenkalti/backoff/v4` as a durect dependency to implement exponential backoff (it is currently an indirect). Signed-off-by: Maurice Yap <mauriceyap@hotmail.co.uk>
This extends
PulsarConfigwithMaxBackoffTime,BackoffRandomizationFactor,BackoffMultiplier,DeadLetterTopic, andDeadLetterMaxAttempts(validatedgte=2), plus aValidate()method checkingMaxBackoffTime >= BackoffTime. Note this is a pure config struct change for now - there is no consumer of these fields yet.In a future PR, I will use
cenkalti/backoff/v4as a durect dependency to implement exponential backoff (it is currently an indirect).