title: Camel EIP to filter duplicates
body: <p>I have a Camel route that dequeues a message off a queue, sends it to a bean for processing, then enqueues the message back onto a different queue.</p>
  
  <p>I am trying to eliminate "duplicate messages" on the 2nd queue. Does Camel have any endpoints, processors, EIPs, etc. that I could configure to dedupe message en route, before they get sent to the 2nd queue?</p>
  
  <p>Example:</p>
  
  <pre><code>&lt;route id="myRoute"&gt;
      &lt;from uri="{{queue-1-uri}}" /&gt;
      &lt;to uri="bean:myBean?method=process" /&gt;
      &lt;!-- How to dedupe right here??? --&gt;
      &lt;to uri="{{queue-2-uri}}" /&gt;
  &lt;/route&gt;
  </code></pre>
  
  <p><strong>Update</strong>: perhaps something like this:</p>
  
  <pre><code>&lt;route id="myRoute"&gt;
      &lt;from uri="{{queue-1-uri}}" /&gt;
      &lt;to uri="bean:myBean?method=process" /&gt;
      &lt;filter&gt;
          &lt;method&gt;what goes here???&lt;/method&gt;
          &lt;to uri="{{queue-2-uri}}" /&gt;
      &lt;/filter&gt;
  &lt;/route&gt;
  </code></pre>
  
  <p>Per Ralf's suggestion, I could then reference a bean inside <code>&lt;method&gt;&lt;/method&gt;</code> that then used a cache to keep messages in memory.</p>
  
  <p><strong>Say this new bean was called <code>FilterBean</code> and it had a <code>dedupe()</code> method on it: how do I wire it up in the Spring XML, and what classes/interfaces does the bean need to implement to be called from inside the route?</strong></p>