Skip to content

Refine ReactiveRedisOperations#listenTo and listenTo…Later Javadoc mentioning resource usage #2229

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

Closed
vpavic opened this issue Jan 7, 2022 · 0 comments
Assignees
Labels
type: documentation A documentation update

Comments

@vpavic
Copy link

vpavic commented Jan 7, 2022

Channel multiplexing reference

Even though sections on Message Listener Containers (both imperative and reactive ones) describe resource sharing between multiple listeners, the term multiplexing isn't explicitly called out anywhere and I believe that would be useful thing to have in the docs. Note that class javadocs of both RedisMessageListenerContainer and ReactiveRedisMessageListenerContainer do mention the concept of channel multiplexing.

Warn about pitfalls of ReactiveRedisOperations#listenTo (and other #listenTo variants)

The ReactiveRedisOperations#listenTo API is tempting to use (in comparison with manually setting up ReactiveRedisMessageListenerContainer) however it comes at a cost as it internally creates a new ReactiveRedisMessageListenerContainer instance on each invocation which can lead to excessive consumption of direct memory. This is somewhat related to issues like these:

I believe javadoc of those methods could warn users about resource usage and hint at considering whether multiplexed solution (in form of user managed ReactiveRedisMessageListenerContainer) is a more appropriate choice for their use case.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jan 7, 2022
@mp911de mp911de added type: documentation A documentation update and removed status: waiting-for-triage An issue we've not yet triaged labels Jan 10, 2022
@mp911de mp911de self-assigned this Jan 10, 2022
@mp911de mp911de assigned mp911de and unassigned christophstrobl Mar 9, 2023
@mp911de mp911de added this to the 3.1.12 (2023.0.12) milestone Apr 16, 2024
@mp911de mp911de changed the title Improve pub-sub related documentation Refine ReactiveRedisOperations#listenTo and listenTo…Later Javadoc mentioning resource usage Apr 16, 2024
mp911de added a commit that referenced this issue Apr 16, 2024
mp911de added a commit that referenced this issue Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: documentation A documentation update
Projects
None yet
Development

No branches or pull requests

4 participants