if(jedis.exists("home:"+buildingId)){
myWebsocket.each("home:"+buildingId, new Each<Session>() {
public void invoke(int index, Session ele, int length) {
myWebsocket.sendJson(ele.getId(), new NutMap("action", "layer").setv("notify", "你有新的待办事宜,请查看收件箱"));
}
});
}
您好,我把房间都房子redis里了,判断对应的房间的key是否存在,存在就发消息给对应的房间,但是这个方法debug的时候这段代码没执行,是什么原因?
public void invoke(int index, Session ele, int length) {
myWebsocket.sendJson(ele.getId(), new NutMap("action", "layer").setv("notify", "你有新的待办事宜,请查看收件箱"));
}