swish_redis.pl -- Redis stream connection
Setup to listening to redis events. We need all the push facilities of
Redis:
- redis_subscribe/4 to listen to volatile PUB/SUB messages
- Listen on reliable redis streams using
XREAD
- Listen on reliable redis streams using consumer groups
Note that config-available sets up the redis server using the alias
swish
. Streams (redis keys) to listen on are registered using the
multifile predicate stream/2.
- reinit_redis
- Stop and start the redis thread. May be used to reconfigure it or
restart when crashed.
- consumer(+Address, -Consumer) is det[private]
- Find the name of this node in the redis network. Each node needs to
have a name to be part of a Redis consumer node, as well as to know
which sessions reside on which node.
- redis_consumer(-Consumer) is det
- True when Consumer is the name of this redis node.
- swish_cluster(-Pairs) is det
- True when Pairs is a list Consumer-URL of peer SWISH servers in this
cluster.
- init_pubsub is det[private]
- Prepare to listen to the SWISH pubsub channels.
Undocumented predicates
The following predicates are exported, but not or incorrectly documented.
- redis_swish_stream(Arg1, Arg2)