-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Labels
status: waiting-for-triageAn issue we've not yet triagedAn issue we've not yet triaged
Description
Title: Allow overriding phase
in RedisMessageListenerContainer
Description:
Currently, RedisMessageListenerContainer
uses the default SmartLifecycle
phase of Integer.MAX_VALUE
.
This makes it difficult to control startup/shutdown ordering relative to other SmartLifecycle
beans in the application.
In some scenarios, developers may want to ensure that certain beans start after the Redis listener container is fully initialized, or conversely, that the container waits until other infrastructure is ready before starting. Since the phase is not configurable, fine-grained lifecycle control is not possible.
Proposal:
Introduce the ability to override the phase
of RedisMessageListenerContainer
, for example by:
- Exposing a
setPhase(int phase)
method
Use case:
- Ensuring custom initialization logic (that depends on the container being ready) runs after the container is started.
- Aligning the container’s lifecycle with other messaging or connection beans that also implement
SmartLifecycle
.
Metadata
Metadata
Assignees
Labels
status: waiting-for-triageAn issue we've not yet triagedAn issue we've not yet triaged