Class ServerRpcHandler.MessageIdSyncException

java.lang.Object
java.lang.Throwable
java.lang.Exception
com.vaadin.flow.server.communication.ServerRpcHandler.MessageIdSyncException
All Implemented Interfaces:
Serializable
Enclosing class:
ServerRpcHandler

public static class ServerRpcHandler.MessageIdSyncException extends Exception
Exception thrown when the client sends a message with an unexpected message ID, indicating that the client and server are out of sync.

This typically occurs when a server pod terminates abruptly (e.g., OOMKilled, SIGKILL) before UI state can be serialized to distributed session storage. When clients reconnect to a healthy pod, their message ID exceeds what the server expects.

Since:
25.1
See Also:
  • Constructor Details

    • MessageIdSyncException

      public MessageIdSyncException(int expectedId, int receivedId)
      Creates a new MessageIdSyncException with the expected and received message IDs.
      Parameters:
      expectedId - the message ID the server expected
      receivedId - the message ID received from the client
  • Method Details

    • getExpectedId

      public int getExpectedId()
      Gets the message ID the server expected.
      Returns:
      the expected message ID
    • getReceivedId

      public int getReceivedId()
      Gets the message ID received from the client.
      Returns:
      the received message ID