Skip to content

Conversation

@artembilan
Copy link
Member

The spring.integration.properties can come with the noAutoStartup
property where we can specify a source polling channel adapter endpoint to
not start automatically.
Turns out the SourcePollingChannelAdapterFactoryBean propagates its
autoStartup property unconditionally which will skip the noAutoStartup value
because an AbstractEndpoint.setAutoStartup() sets an autoStartupSetExplicitly state

  • Fix SourcePollingChannelAdapterFactoryBean to rely on a Boolean object state
    and don't call target endpoint setAutoStartup() if it was not set
  • Adjust spring.integration.properties in tests to use noAutoStartup
    for some SourcePollingChannelAdapterFactoryBean
  • Verify that property was applied in the IntegrationFlowTests.testWithSupplierMessageSourceImpliedPoller()

Cherry-pick to 5.4.x & 5.3.x

The `spring.integration.properties` can come with the `noAutoStartup`
property where we can specify a source polling channel adapter endpoint to
not start automatically.
Turns out the `SourcePollingChannelAdapterFactoryBean` propagates its
`autoStartup` property unconditionally which will skip the `noAutoStartup` value
because an `AbstractEndpoint.setAutoStartup()` sets an `autoStartupSetExplicitly` state

* Fix `SourcePollingChannelAdapterFactoryBean` to rely on a `Boolean` object state
and don't call target endpoint `setAutoStartup()` if it was not set
* Adjust `spring.integration.properties` in tests to use `noAutoStartup`
for some `SourcePollingChannelAdapterFactoryBean`
* Verify that property was applied in the `IntegrationFlowTests.testWithSupplierMessageSourceImpliedPoller()`

**Cherry-pick to `5.4.x` & `5.3.x`**
@garyrussell garyrussell merged commit a577652 into spring-projects:main Jul 7, 2021
@garyrussell
Copy link
Contributor

And cherry-picked to 5.4.x, and to 5.3.x after resolving conflicts.

@artembilan artembilan deleted the Fix_polling_endpoint_autoStartup branch September 20, 2022 18:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants