You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We should allow registration of push message listeners given that Redis 6 (RESP3) features push messages. In RESP3 mode, a connection does not require an active subscription to receive push notifications, instead, Redis sends messages starting with > where the first item is a String. The rest of the message remains dynamic.
It would make sense to provide a generic callback such as RedisPushListener with a onPush(String type, Object args) signature. Examples for push messages are:
Pub/Sub Channel Subscription:
>3
$7
message
$5
hello
$5
world
Client-side Caching:
>3
>2
$10
invalidate
*1
$3
key
Typically, the second argument (Object) would be either a List<Object> containing the all arguments from position 2 or be only the second argument.
Since we don't have any relation to keys and values, we need to define which part of a RedisCodec we would have to use.
Push message listeners would be registered directly on StatefulConnection. For Redis Cluster, we could add an extension similar to RedisClusterPubSubListener that defines the cluster node from which the event originated.
The text was updated successfully, but these errors were encountered:
We now support registration of push message listeners through StatefulRedisConnection and StatefulRedisClusterConnection. PushListener are notified upon receiving push messages through RESP3.
StatefulRedisConnection connection = …;
conn.addListener(pushMessage -> …);
We should allow registration of push message listeners given that Redis 6 (RESP3) features push messages. In RESP3 mode, a connection does not require an active subscription to receive push notifications, instead, Redis sends messages starting with
>
where the first item is aString
. The rest of the message remains dynamic.It would make sense to provide a generic callback such as
RedisPushListener
with aonPush(String type, Object args)
signature. Examples for push messages are:Pub/Sub Channel Subscription:
Client-side Caching:
Typically, the second argument (
Object
) would be either aList<Object>
containing the all arguments from position 2 or be only the second argument.Since we don't have any relation to keys and values, we need to define which part of a
RedisCodec
we would have to use.Push message listeners would be registered directly on
StatefulConnection
. For Redis Cluster, we could add an extension similar toRedisClusterPubSubListener
that defines the cluster node from which the event originated.The text was updated successfully, but these errors were encountered: