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
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 Summary
ConstructorsConstructorDescriptionMessageIdSyncException(int expectedId, int receivedId) Creates a new MessageIdSyncException with the expected and received message IDs. -
Method Summary
Modifier and TypeMethodDescriptionintGets the message ID the server expected.intGets the message ID received from the client.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
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 expectedreceivedId- 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
-