GH-10046: Propagate error strategy in the JmsEndpoint

Fixes: #10046
Issue link: https://github.com/spring-projects/spring-integration/issues/10046

The `JmsMessageDrivenEndpoint` does not propagate an `ErrorMessageStrategy` down to the `ChannelPublishingJmsMessageListener.GatewayDelegate`

* Expose `JmsMessageDrivenEndpoint.setErrorMessageStrategy()` and call respective `this.listener.setErrorMessageStrategy()`

**Auto-cherry-pick to `6.4.x` & `6.3.x`**
This commit is contained in:
Artem Bilan
2025-05-20 11:20:39 -04:00
parent 5bdf35a7d9
commit da1ec071c5
4 changed files with 30 additions and 5 deletions

View File

@@ -164,7 +164,7 @@ public abstract class MessageProducerSupport extends AbstractEndpoint
* @param errorMessageStrategy the {@link ErrorMessageStrategy}.
* @since 4.3.10
*/
public final void setErrorMessageStrategy(ErrorMessageStrategy errorMessageStrategy) {
public void setErrorMessageStrategy(ErrorMessageStrategy errorMessageStrategy) {
Assert.notNull(errorMessageStrategy, "'errorMessageStrategy' cannot be null");
this.errorMessageStrategy = errorMessageStrategy;
}