Skip to content

Update RedisOperations#convertAndSend to return number of subscribers #2209

Closed
@vpavic

Description

@vpavic

Currently, RedisOperations#convertAndSend is void event though the underlying RedisPubSubCommands#publish returns a Long that represents the number of subscribers receiving the published message (see https://redis.io/commands/publish).

The information about the number of subscribers can be useful in some scenarios, and is also returned by the reactive counterpart in ReactiveRedisOperations#convertAndSend.

Digging through the history of RedisOperations, it seems that #convertAndSend used to return Long for a brief period of time in 2013: it was introduced in b35f6a3 and reverted in d46bee7.

I understand that adding return value would be a breaking change, but the impact doesn't seem to be too big (?). I'm willing to submit a PR to address this, if the change is welcome.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions