I have a redis instance that publishes messages via different topics. Instead of implementing a complex heartbeat mechanism (complex because the instance would stop publishing messages after some time if they are not consumed), is there a way to check whether pubs are consumed by anyone?
For example, instance RedisServer
publishes messages to topic1
and topic2
. RedisClient1
subscribes to topic1
and RedisClient2
subscribes to topic2
. When RedisClient2
for whatever reason stops consuming messages of topic2
then I want RedisServer
to know about it and decide when to stop publishing messages to topic2
. The discontinuation of topic2
consumption is unpredictable hence I am not able to inform RedisServer
of the discontinuation/unsubscription.
I thought if there was a way for a redis instance to know whether messages of a certain topic are consumed or not then that would be very helpful information.
Any idea whether that is possible?