Search code examples
javacometd

Cometd: How long does the clientId last?


I've tried to track this down in the docs, but I don't see it anywhere.

In CometD, how long does the clientId live?

So, a client logs in and handshakes successfully. Now they have a clientId that is associated with their session on the server. At what point is that clientID no longer valid?

We need to reliably ensure clients have received messages.


Solution

  • To answer the first question, there is no limit to the duration of the clientId (also known as session id). However, server applications can decide to have the client re-handshake and get a new session id, if they feel like.

    The second "question" about reliably deliver messages to clients is unrelated from the first. If you meant the two to be connected in some way, they are not.

    In order to reliably deliver messages to clients, CometD offers the acknowledgement extension.