Search code examples
python-2.7redispublish-subscribe

How can I know the number of messages queued in redis pub-sub?


Amazon SQS gives a direct number of messages available and in flight, is there a way to see the number of messages available in redis pub-sub?


Solution

  • Redis' PubSub is shoot-and-forget, meaning there is no number of messages available or in flight (put differently, it is always 0).

    There exists the PUBSUB command that tells you about the current channels and subscribers. The same for INFO stats.