#include <userver/storages/redis/subscribe_client.hpp>
Client that allows subscribing to Redis channel messages.
Usually retrieved from components::Redis component.
Callback for each received message is called only after the execution of callback for previous message has finished. For parallel message processing use the utils::Async().
Subscribe()
or Psubscribe()
return as it happens in a separate task.Definition at line 42 of file subscribe_client.hpp.
Public Member Functions | |
virtual SubscriptionToken | Subscribe (std::string channel, SubscriptionToken::OnMessageCb on_message_cb, const ::redis::CommandControl &command_control)=0 |
SubscriptionToken | Subscribe (std::string channel, SubscriptionToken::OnMessageCb on_message_cb) |
virtual SubscriptionToken | Psubscribe (std::string pattern, SubscriptionToken::OnPmessageCb on_pmessage_cb, const ::redis::CommandControl &command_control)=0 |
virtual size_t | ShardsCount () const =0 |
virtual bool | IsInClusterMode () const =0 |
SubscriptionToken | Psubscribe (std::string pattern, SubscriptionToken::OnPmessageCb on_pmessage_cb) |
virtual SubscriptionToken | Ssubscribe (std::string channel, SubscriptionToken::OnMessageCb on_message_cb, const ::redis::CommandControl &command_control)=0 |
SubscriptionToken | Ssubscribe (std::string channel, SubscriptionToken::OnMessageCb on_message_cb) |
|
inline |
Definition at line 65 of file subscribe_client.hpp.
|
inline |
Definition at line 75 of file subscribe_client.hpp.
|
inline |
Definition at line 52 of file subscribe_client.hpp.