Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The Idempotent Consumer essentially acts like a Message Filter to filter out duplicates.

Using the Fluent Builders

The following example will use the header myMessageId to filter out duplicates

Wiki Markup
{snippet:id=idempotent|lang=java|url=activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/RouteBuilderTest.java}

...

Wiki Markup
{snippet:id=idempotent|lang=java|url=activemq/camel/trunk/camel-jpa/src/test/java/org/apache/camel/processor/jpa/JpaIdempotentConsumerTest.java}

In the above example we are using the header messageId to filter out duplicates and using the collection myProcessorName to indicate the Message ID Repository to use. This name is important as you could process the same message by many different processors; so each may require its own logical Message ID Repository.

Using the Spring XML Extensions

...