Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No configuration property for defaultTimeout setting that was introduced in Spring Integration 6.2 #41477

Closed
artembilan opened this issue Jul 12, 2024 · 3 comments
Assignees
Labels
type: bug A general bug
Milestone

Comments

@artembilan
Copy link
Member

Starting with version 6.2, Spring Integration provides a global configuration property spring.integration.endpoints.defaultTimeout: https://docs.spring.io/spring-integration/reference/configuration/global-properties.html.

Looks like we are missing to cover it in the IntegrationProperties.Endpoint and in the IntegrationPropertiesEnvironmentPostProcessor.IntegrationPropertiesPropertySource.

This is an original issue where we have introduced that property, and we even discuss that a Spring Boot improvement: spring-projects/spring-integration#8704

Let me know and I'll be glad to contribute the fix!

Thanks

@wilkinsona
Copy link
Member

I wonder if we should consider this to be a bug of omission. It makes it hard (you need to use a bean post-processor) to configure the timeout as Boot's auto-configured IntegrationProperties bean prevents Spring Integration from defining its own that would be populated using META-INF/spring.integration.properties.

@wilkinsona wilkinsona added the for: team-meeting An issue we'd like to discuss as a team to make progress label Jul 15, 2024
@philwebb philwebb changed the title Expose spring.integration.endpoint.defaultTimeout property Expose spring.integration.endpoint.defaultTimeout property Jul 15, 2024
@artembilan
Copy link
Member Author

Yes. That's my impression as well, Andy.

Although I think as a quick fix for the current state of things we could just add a missed property handling into Spring Boot to give it a chance to make it into the current release train.

As a proper fix I think we need to let Spring Integration create its own IntegrationProperties bean based on those META-INF/spring.integration.properties and override those based on the auto-configuration.
This way we always will be able to preserve those properties which are new in Spring Integration and not covered by Spring Boot yet, and have an auto-configuration as a primary source for covered properties.

I understand the purpose of the IntegrationPropertiesEnvironmentPostProcessor to have a dedicated PropertySource, but looks like it is not that robust to make things flexible enough.

@wilkinsona
Copy link
Member

We discussed this today and agreed to consider it a bug of omission. As part of fixing it, we want to add a test so that Boot's build will fail if a property is added to org.springframework.integration.context.IntegrationProperties and we don't have support for it.

@wilkinsona wilkinsona added type: bug A general bug and removed status: waiting-for-triage An issue we've not yet triaged for: team-meeting An issue we'd like to discuss as a team to make progress labels Jul 15, 2024
@wilkinsona wilkinsona added this to the 3.2.x milestone Jul 15, 2024
@wilkinsona wilkinsona changed the title Expose spring.integration.endpoint.defaultTimeout property No configuration property for defaultTimeout setting that was introduced in Spring Integration 6.2 Jul 15, 2024
@wilkinsona wilkinsona self-assigned this Jul 16, 2024
@wilkinsona wilkinsona modified the milestones: 3.2.x, 3.2.8 Jul 16, 2024
artembilan added a commit to spring-projects/spring-integration-samples that referenced this issue Jul 16, 2024
Fixes: #361

The default request timeout in Spring Integration is `30 seconds`
to not block the thread forever.
However, the logic in the Cafe Demo is longer even that one minute
to wait for all the drinks to be ready to free an order queue.

* Add `spring.integration.endpoint.default-timeout=-1` to wait on the customer request forever for the logic of the application
* Add `spring.task.scheduling.pool.size=10` to avoid deadlock when all the scheduled tasks compete for the same thread by default
* Upgrade to latest Gradle
* Upgrade to the latest Spring Boot

Related to: spring-projects/spring-boot#41477
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A general bug
Projects
None yet
Development

No branches or pull requests

3 participants