From 89f79482c377d061c9c728ecc34dd3304fdb71bc Mon Sep 17 00:00:00 2001 From: Artem Bilan Date: Wed, 26 Feb 2025 16:19:14 -0500 Subject: [PATCH] GH-9863: Deprecate `PollerMetadata.sendTimeout` option Fixes: #9863 Issue link: https://github.com/spring-projects/spring-integration/issues/9863 The `PollerMetadata.sendTimeout` has been migrated to the `SourcePollingChannelAdapter.setSendTimeout()` long time ago. Right now this option is not propagated anywhere * Introduce missed `SourcePollingChannelAdapterSpec.sendTimeout` * Deprecate (for removal) `PollerMetadata.sendTimeout` * Verify `SourcePollingChannelAdapterSpec.sendTimeout` option in the `ReactiveStreamsTests` (cherry picked from commit 0af3b25cd6a632f674d7d1344db1b7b68e40e822) # Conflicts: # spring-integration-core/src/main/java/org/springframework/integration/dsl/SourcePollingChannelAdapterSpec.java --- .../springframework/integration/dsl/PollerSpec.java | 10 ++++++++-- .../dsl/SourcePollingChannelAdapterSpec.java | 13 ++++++++++++- .../integration/scheduling/PollerMetadata.java | 4 +++- .../dsl/reactivestreams/ReactiveStreamsTests.java | 5 ++++- 4 files changed, 27 insertions(+), 5 deletions(-) diff --git a/spring-integration-core/src/main/java/org/springframework/integration/dsl/PollerSpec.java b/spring-integration-core/src/main/java/org/springframework/integration/dsl/PollerSpec.java index efbcf020dd..7d3a3dee12 100644 --- a/spring-integration-core/src/main/java/org/springframework/integration/dsl/PollerSpec.java +++ b/spring-integration-core/src/main/java/org/springframework/integration/dsl/PollerSpec.java @@ -1,5 +1,5 @@ /* - * Copyright 2016-2020 the original author or authors. + * Copyright 2016-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -189,8 +189,14 @@ public final class PollerSpec extends IntegrationComponentSpec new GenericMessage<>("a,b,c,d,e,f"), e -> e.poller(p -> p.trigger(ctx -> this.invoked.getAndSet(true) ? null : Instant.now())) + .sendTimeout(256) .id("reactiveStreamsMessageSource")) .split(String.class, p -> p.split(",")) .log()