Skip to content

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

Closed
@vpavic

Description

@vpavic

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.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions