Prevents duplicate request processing based on a dynamic idempotency key.
This interceptor evaluates an expression (e.g., from headers or body) to extract an idempotency key. If the key has already been processed, it aborts the request with a 409 response.
Useful for handling retries from clients to avoid duplicate side effects like double payment submissions.
Attributes
| Name | Required | Default | Description | Examples |
|---|---|---|---|---|
| expiration | false | 3600 | Time in seconds after which idempotency keys automatically expire. Useful to avoid memory leaks in long-running systems. Common values:
| - |
| key | true | - | Expression used to extract the idempotency key from the exchange. Can be an XPath, JSONPath, header, or other supported syntax depending on the language. | $.id |
| language | false | SpEL | the language of the 'test' condition | SpEL, groovy, jsonpath, xpath |