Class IntegrationClientException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
dev.restate.integration.IntegrationClientException
- All Implemented Interfaces:
Serializable
The failure that pending producer futures complete with when the ingestion stream errors or
closes.
getKind() maps the server's ErrorKind, or IntegrationClientException.Kind.UNKNOWN for
transport-level failures.
An error is either record-scoped or stream-scoped. A record-scoped error rejects
a single record (a missing key, an unknown handler, an internal ingestion failure, ...) while the
stream itself stays well-formed; getInvocationOffset() then carries the offset of the
offending record. A stream-scoped error describes the stream as a whole (shutdown, a protocol
violation, an invalid Start/IngestionDefaults) and leaves the offset unset.
Either way the server tears the stream down after the error; the offset lets an exactly-once
caller resume from the last committed offset and skip the rejected record before resending the
rest.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumClassification of an ingestion stream failure. -
Constructor Summary
ConstructorsConstructorDescriptionIntegrationClientException(IntegrationClientException.Kind kind, String message) IntegrationClientException(IntegrationClientException.Kind kind, String message, @Nullable Long invocationOffset) IntegrationClientException(IntegrationClientException.Kind kind, String message, Throwable cause) IntegrationClientException(IntegrationClientException.Kind kind, String message, Throwable cause, @Nullable Long invocationOffset) -
Method Summary
Methods inherited from class Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
IntegrationClientException
-
IntegrationClientException
public IntegrationClientException(IntegrationClientException.Kind kind, String message, @Nullable Long invocationOffset) -
IntegrationClientException
public IntegrationClientException(IntegrationClientException.Kind kind, String message, Throwable cause) -
IntegrationClientException
public IntegrationClientException(IntegrationClientException.Kind kind, String message, Throwable cause, @Nullable Long invocationOffset)
-
-
Method Details
-
getKind
-
getInvocationOffset
The offset of the record this error is associated with, ornullwhen the error is stream-scoped (not attributable to a single record).- Returns:
- the offset of the rejected record, or
nullfor a stream-scoped error
-