Hi,I use redis cluster,config set notify-keyspace-events Ex, but it couldn't Trigger redis expired event,

like this: container.addMessageListener( messageListener(), new ChannelTopic( "keyevent@0:expired" );

but standalone it's success;

What should I do?

Thanks;

Comment From: MrH2H

@hongliuliao hi They look the same;

Comment From: itamarhaber

@huirss -

Reading through the original, are you saying that expiry events are not broadcasted in the cluster? Are you successful in listening to other keyspace notification in the cluster?

Comment From: mgravell

Note: keyspace notifications are node-specific, unlike regular pub/sub which is broadcast from all nodes. So: you (or the library you are using) would need to attach to all nodes to reliably get keyspace notifications from cluster.

Comment From: itamarhaber

Thanks @mgravell, GTK (or be reminded ;)).

This issue can be closed, as it is a question that was answered.

Comment From: dealslama

@mgravell Hi Marc, Can you help me with adding nodes for subscriptions? I mean do I need to provide HOST IP or NodeID of each node? @itamarhaber

Comment From: itamarhaber

@dealslama as keyspace notifications are not broadcasted in the cluster you'll have to: 1. Open a connection to each of the cluster's nodes 2. In each connection, subscribe to keyspace notifications from that node

Comment From: huangzhuxing

Need to modify the configuration on each node

Comment From: itamarhaber

This has been also added to the documentation via https://github.com/redis/redis-doc/pull/1367

Closing - feel free to reopen or create a new issue if needed.