Skip to content

Update RedisOperations#convertAndSend to return number of subscribers #2209

Closed

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.

Activity

  1. mp911de commented on Dec 7, 2021

    @mp911de
    Member

    Thanks for the report. Seems the method signature was reverted to keep binary compatibility. We could consider the change for the next major revision of Spring Data Redis.

  2. added 3 commits that reference this issue on Jan 5, 2022
    c881597
    42a9ad5
    2947865
  3. added a commit that references this issue on Mar 31, 2022
  4. added this to the 3.0 M4 (2022.0.0) milestone on Mar 31, 2022
  5. self-assigned this
    on Mar 31, 2022
  6. added 2 commits that reference this issue on Mar 31, 2022
  7. added a commit that references this issue on Apr 26, 2024
    178d44c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions