Package com.babelqueue.schema
Class InvalidPayloadException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.babelqueue.BabelQueueException
com.babelqueue.schema.InvalidPayloadException
- All Implemented Interfaces:
Serializable
Raised when a message's
data does not match the JSON Schema registered for its URN
(ADR-0024). The consumer-side SchemaValidation.wrap(com.babelqueue.schema.SchemaProvider, com.babelqueue.idempotency.Handler) throws it so the adapter
redelivers (and eventually dead-letters) a poison message; the recommended primary use is
producer-side (SchemaValidation.validate(com.babelqueue.schema.SchemaProvider, java.lang.String, java.util.Map<java.lang.String, java.lang.Object>)) so invalid data never enters the queue.- See Also:
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
InvalidPayloadException
- Parameters:
urn- the message URN whose schema was violatedviolation- the first"<json-pointer>: <reason>"mismatch
-
-
Method Details
-
urn
- Returns:
- the message URN whose schema was violated
-
violation
- Returns:
- the first
"<json-pointer>: <reason>"mismatch
-