Dhairya-007 opened a new pull request, #29950: URL: https://github.com/apache/camel/pull/29950
## Problem `AbstractCamelRedeliveryPolicyFactoryBean` keeps its own `@Metadata` copy of the redelivery policy options, separate from `RedeliveryPolicyDefinition`. Both end up in `camel-spring.xsd`, so the same attribute is documented twice in one schema - once under `redeliveryPolicyProfile` and once under `redeliveryPolicy` - and three of the profile copies say something different from the model copy. These three are wrong, not just terser: **`redeliveryDelay`** carried `maximumRedeliveryDelay`'s text verbatim: ```java @Metadata(defaultValue = "1000", description = "Sets the maximum redelivery delay. Use -1 if you wish to have no maximum") private String redeliveryDelay; ... @Metadata(defaultValue = "60000", description = "Sets the maximum redelivery delay. Use -1 if you wish to have no maximum") private String maximumRedeliveryDelay; ``` It is the initial delay before the first attempt, and `-1` means nothing to it, so the text sends the reader to the wrong option and suggests a value that does not do what it says. **`retryAttemptedLogInterval`** declared `defaultValue = "0"`, but `RedeliveryPolicy` initialises it to `1`: ```java protected int retryAttemptedLogInterval = 1; ``` The description also did not say what the number counts, so `0` read as "no interval" rather than as a wrong default. **`logRetryStackTrace`** carried `logStackTrace`'s text, so in the generated schema the two attributes read identically and nothing said that this one is about retry attempts that failed. Looking at the schema as shipped, `redeliveryDelay` has this documentation under `redeliveryPolicyProfile`: > Sets the maximum redelivery delay. Use -1 if you wish to have no maximum. Default value: 1000 and this one, three thousand lines further down, under `redeliveryPolicy`: > Sets the initial delay in milliseconds before the first redelivery attempt. Default value: 1000 ## Fix Give the three profile options the `RedeliveryPolicyDefinition` wording and correct `retryAttemptedLogInterval`'s default to `1`, so both copies of each attribute in `camel-spring.xsd` now read the same. The other profile descriptions are shorter than the model's but not wrong, so they are left alone. The regenerated `redeliveryPolicyProfile.json` and `camel-spring.xsd` are included. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
