class AnyCable::BroadcastAdapters::Redisx
AnyCable.broadcast_adapter = :redisx, { url: “redis://my_redis”, stream_name: “any_cable” }
You can override these params:
NOTE: The ‘redis_channel` config param is used as a stream name.
by default.
It uses Redis configuration from global AnyCable config
AnyCable.broadcast_adapter = :redisx
Example:
It’s required for the Broker (hot streams cache) support.
to a single WS server, which is responsible for re-broadcasting it within the cluster.
Unlike Redis adapter, RedisX adapter delivers each broadcast message only
Next-gen Redis adapter for broadcasting over Redis streams.
def announce!
def announce! logger.info "Broadcasting Redis stream: #{channel}" end
def raw_broadcast(payload)
def raw_broadcast(payload) redis_conn.xadd(channel, {payload: payload}) end