-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Allow configuring phase in RedisMessageListenerContainer
#3224
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
base: main
Are you sure you want to change the base?
Conversation
…in RedisMessageListenerContainer. Signed-off-by: Su Ko <[email protected]>
8143666
to
982b789
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the pull request. Care to also add a field for the autoStartup
property? That would nicely align with JedisConnectionFactory
and LettuceConnectionFactory
.
RedisMessageListenerContainer
Done ! 🙂 |
…isMessageListenerContainer Signed-off-by: Su Ko <[email protected]>
f9c2019
to
5ae169b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👋🏻 @bandalgomsu ,
Thank you for this excellent contribution! It is looking good.
Do you mind adding the same treatment to the org.springframework.data.redis.stream.DefaultStreamMessageListenerContainer
as it also adheres to the SmartLifecycle
contract and will likely benefit from this improvement?
Thanks
* Specify the lifecycle phase for this container. | ||
* Lower values start earlier and stop later. | ||
* The default is {@code Integer.MAX_VALUE}. | ||
* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mind adding a @since 4.0.0
tag here and in the setAutoStartup
as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: 4.0
instead of 4.0.0
Signed-off-by: Su Ko <[email protected]>
Hi @onobc What do you think about allowing 'phase' and 'autoStartup' to be configured either on 'StreamMessageListenerContainer' or through 'StreamMessageListenerContainerOptions' ? ? |
a27b56c
to
2bd17c9
Compare
…hase' in `DefaultStreamMessageListenerContainer` Signed-off-by: Su Ko <[email protected]>
2bd17c9
to
0e59f19
Compare
|
Agreed. Good suggestion @bandalgomsu . |
f5d7dd2
to
396711e
Compare
This PR introduces a configurable
phase
property inRedisMessageListenerContainer
.Previously, the container always used
Integer.MAX_VALUE
as its SmartLifecycle phase, making it difficult to align startup/shutdown ordering with other SmartLifecycle beans.#3208