spring-cloud / spring-cloud/spring-cloud-stream

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.

Backport 4.2.x enhancement waiting-on-feedback
Dominant language
Java
Stars
1.1k
Forks
646
Avg merge
2d 3h
Merged PRs (30d)
8

Description

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

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.

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.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.