Cometd 在客户端订阅持久 channel 后立即扫描 session
日志消息: 客户端 41mpv6rfh63ij316pphziifnmsj 订阅 channel ::/notification 2014-02-19 11:05:19,010 [BayeuxServer@1449984133] 调试 [org.cometd.bayeux.server.ServerSession 扫描] - 扫描 session 41mpv6rfh63ij316pphziifnmsj - 最后连接 1392825919011 毫秒前
channel 被标记为持久
@Configure("/notification")
public void configureChannel(ConfigurableServerChannel channel)
{
channel.setPersistent(true);// channel persistent
channel.addAuthorizer(GrantAuthorizer.GRANT_ALL);
}
最佳答案
日志非常不完整,并且没有时间信息,但原则上,如果 session 订阅了 channel ,那么它可以随时被清除。
如果没有与客户端通信, session 将被清除,这与客户端是否订阅任何 channel 无关。
关于java - 客户端订阅 channel 后 Cometd 扫描 session ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21886003/