Idempotent Consumer — Filters out duplicate messages
The Idempotent Consumer pattern uses an expression to generate message IDs. The IDs are used to filter duplicate messages. When a duplicate is detected it is consumed.
The Idempotent Consumer pattern can be placed anywhere along the body of a route.
Table 14 describes the properties you can specify using the properties editor.
Table 14. Idempotent Consumer Properties
Name | Description |
---|---|
Expression | Specifies the expression used to generate message IDs. |
language | Specifies the expression language used to process the expression. |
Remove On Failure | Specifies whether to remove the ID of a failed exchange. The default is Disabled . |
Message Id Repository Ref | Specifies a reference to the implementation of
IdempotentRepository used to store the message
IDs. |
Inherit Error Handler | Specifies whether the node should use the error handler configured for the route.
The default is Disabled . |
Eager | Specifies whether messages are eagerly added to the repository before the
exchange finishes processing. If so, the route can identify duplicates while exchanges
are still being processed. The default is Enabled . |
Skip Duplicate | Specifies whether to skip duplicate messages. The default is
Enabled . When disabled, a duplicate message continues
through the node, but the exchange is marked a duplicate. |
Id | Specifies a unique identifier for the endpoint. The Id can be used to refer to the endpoint in the Camel XML file. |
Description | Specifies a text description for the node. This description is included in the generated XML file, but it is informational only. It is not used by Apache Camel. |