Table of Contents
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. ==== Properties Table 39, “Idempotent Consumer Properties” describes the properties you can specify using the properties editor.
Table 39. Idempotent Consumer Properties
| Name | Description |
|---|---|
| Specifies the expression language used to process the expression. |
| Specifies a reference to the implementation of IdempotentRepository used to store the message IDs. |
| Specifies whether to complete the idempotent consumer eager or when the exchange is done. The default is Disabled. |
| 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. |
| 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. |
| Specifies a unique identifier for the endpoint. The tooling automatically generates an id for a node when it is created, but you can remove that id or replace it with your own. The Camel debugger requires all nodes with a breakpoint set to have a unique id. You can use the id to refer to endpoints in your Camel XML file. |
| Specifies whether to remove the ID of a failed exchange. The default is Disabled. |
| 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. |