You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I create an IntegrationFlow setting the sendTimeout value on SourcePollingChannelAdapterSpec is being ignored causing the polling thread to block. This does not happen if I create a SourcePollingChannelAdapter programmatically. For example, programmatically with a @Configuration class:
With the channel queue as configured, this configuration throws an exception as anticipated because there is no consumer of the channel jdbcInboundChannel. Contrast this using an IntegrationFlow configuration:
@ConfigurationpublicclassJdbcDSLConfig {
@BeanpublicQueueChannelSpecjdbcInboundChannel() {
returnMessageChannels.queue(1);
}
@BeanpublicMessageSource<Object> jdbcMessageSource(finalDataSourcedataSource) {
returnnewCustomJdbcPollingChannelAdapter(dataSource, "select dp_id, dp_payload from data_packets");
}
@BeanpublicThreadPoolTaskExecutorjdbcExecutor() {
finalThreadPoolTaskExecutortaskExecutor = newThreadPoolTaskExecutor();
taskExecutor.setCorePoolSize(1);
taskExecutor.setMaxPoolSize(1);
taskExecutor.initialize();
returntaskExecutor;
}
@BeanpublicIntegrationFlowjdbcInboundFlow(finalMessageSource<Object> jdbcMessageSource,
finalQueueChannelSpecjdbcInboundChannel,
@Qualifier("jdbcExecutor") finalThreadPoolTaskExecutorjdbcExecutor) {
returnIntegrationFlow.from(jdbcMessageSource,
c -> c.poller(Pollers
.fixedDelay(2000)
.sendTimeout(1) // this has no effect.
.taskExecutor(jdbcExecutor)))
.channel(jdbcInboundChannel)
.get();
}
}
This configuration blocks on the second polling of the database even with a sendTimeout set in the configuration.
I have tested this with Spring-boot 3.4.0 & 3.2.0
The text was updated successfully, but these errors were encountered:
Fixes: #9863
Issue link: #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 0af3b25)
Fixes: #9863
Issue link: #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 0af3b25)
# Conflicts:
# spring-integration-core/src/main/java/org/springframework/integration/dsl/SourcePollingChannelAdapterSpec.java
Issue link: #9863
The `PollerMetadata.sendTimeout` has been deprecated in previous versions
in favor of ``
* Remove `PollerMetadata.sendTimeout` and `PollerSpec.sendTimeout`
in favor of `SourcePollingChannelAdapterSpec.sendTimeout`
When I create an IntegrationFlow setting the
sendTimeout
value onSourcePollingChannelAdapterSpec
is being ignored causing the polling thread to block. This does not happen if I create aSourcePollingChannelAdapter
programmatically. For example, programmatically with a@Configuration
class:With the channel queue as configured, this configuration throws an exception as anticipated because there is no consumer of the channel
jdbcInboundChannel
. Contrast this using anIntegrationFlow
configuration:This configuration blocks on the second polling of the database even with a sendTimeout set in the configuration.
I have tested this with Spring-boot 3.4.0 & 3.2.0
The text was updated successfully, but these errors were encountered: