user2263197
user2263197

Reputation: 97

Cometd Sweeps Session after Client Subscribed to Channel

Cometd sweeps session immediately after the the client subscribed to the persistent channel

log message: Client 41mpv6rfh63ij316pphziifnmsj subscribed to Channel ::/notification 2014-02-19 11:05:19,010 [BayeuxServer@1449984133] DEBUG [org.cometd.bayeux.server.ServerSession sweep] - Sweeping session 41mpv6rfh63ij316pphziifnmsj - last connect 1392825919011 ms ago

Channel is marked as persistent

@Configure("/notification")
public void configureChannel(ConfigurableServerChannel channel)
{
    channel.setPersistent(true);// channel persistent
    channel.addAuthorizer(GrantAuthorizer.GRANT_ALL);   

}

Upvotes: 1

Views: 226

Answers (1)

sbordet
sbordet

Reputation: 18597

The log is vastly incomplete and without timing information, but in principle if a session is subscribed to a channel then it can be swept any moment.

Sessions are swept if there is no communication with the client, which is independent from whether they are or not subscribed to any channel.

Upvotes: 1

Related Questions