Search code examples
javacometcometd

Cometd maxInterval configurations per session


Is there a way to configure the cometd server maxInterval per user session ?

https://github.com/cometd/cometd-documentation/blob/master/src/main/asciidoc/java_server_configuration.adoc

maxInterval 10000 The maximum period of time, in milliseconds, that the server waits for a new long poll from a client before that client is considered invalid and is removed

We wanted to configure this on case basis depending on the client types? In scenarios where there cold be patchy network wanted to configure this to a higher value and use a lesser value in other scenario.


Solution

  • The ability to set maxInterval for each ServerSession has been introduced with the fix for issue #844.

    This is available since CometD 4.0.4.

    See also the javadoc.