Alling getPhase() with Updated Phases for Graceful Shutdown

Open
#3,030 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
48/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Domain
backend

Research direction

Start with core/spring-cloud-stream/src/main/java/org/springframework/cloud/stream/binding/InputBindingLifecycle.java at getPhase(), then inspect the corresponding OutputBindingLifecycle class. Compare both phase values with the Spring Boot 3.0 graceful-shutdown migration guidance; done means both lifecycle implementations use the updated phases so graceful shutdown follows the documented ordering.

Written by the indexing model from the issue text.

Description

Backport 4.2.x enhancement waiting-on-feedback

https://github.com/spring-cloud/spring-cloud-stream/blob/e14bc1cb51cb4475dfe054b91b7f6ba6a4441be1/core/spring-cloud-stream/src/main/java/org/springframework/cloud/stream/binding/InputBindingLifecycle.java#L52

According to https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.0-Migration-Guide#updated-phases-for-graceful-shutdown:

Updated Phases for Graceful Shutdown

The phases used by the SmartLifecycle implementations for graceful shutdown have been updated. Graceful shutdown now begins in phase SmartLifecycle.DEFAULT_PHASE - 2048 and the web server is stopped in phase SmartLifecycle.DEFAULT_PHASE - 1024. Any SmartLifecycle implementations that were participating in graceful shutdown should be updated accordingly.

getPhase() for classes InputBindingLifecycle, OutputBindingLifecycle should be aligned too so graceful shutdown is working as excepted

Dominant language
Java
Stars
1.1k
Forks
646
Avg merge
2d 3h
Merged PRs (30d)
8

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from spring-cloud/spring-cloud-stream

All issues in spring-cloud/spring-cloud-stream

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.