We don't use explicit PUBLISH. Instead we use keyspace notifications, where the subscriber gets notified about any changes to any keys in the keyspace, meaning that the SET alone triggers a notification to the subscriber. Keyspace notifications must be enabled in the Redis config (they're usually disabled by default) which is a common oversight.
Cheers
Thank you, that has got me 1 step further.
The problem I am seeing now is
rtpengine[556738]: WARNING: [9jn7UU7wHza8WGocdQBlXg..]: [core] Failed to restore call ID '9jn7UU7wHza8WGocdQBlXg..' from Redis: could not retrieve JSON data from redis
Again watching the MONITOR, I can see the SET from Server A and see that the variable is being set and read from Server B
1652283461.250255 [1 10.139.0.6:43928] "SET" "9jn7UU7wHza8WGocdQBlXg.." "{\"json\":...}"
1652283461.250627 [1 10.139.0.6:43928] "EXPIRE" "9jn7UU7wHza8WGocdQBlXg.." "86400"
1652283461.251425 [1 10.139.0.6:43930] "PING"
1652283461.251459 [1 10.139.0.9:53988] "PING"
1652283461.251983 [1 10.139.0.9:53988] "GET" "9jn7UU7wHza8WGocdQBlXg.."
I am using the 10.4 stable branch on both servers. Any suggestions?
That doesn't really explain what's happening so you need to look further. The error message is logged when the GET command didn't return any data (or didn't return a string), but I can only guess as to why that is. Perhaps it's trying to read from the wrong DB? The most thorough way to inspect what's going on is with Wireshark: look at what's happening on the Redis port, look at the GET command and what response it returns, look at the SELECT command preceding it.
Cheers