Sure - some XSLT will do it - and it becomes a string.
I opened an issue some time ago about having the possibility to make the
messageId a complex object, possibly holding several keys:
https://issues.apache.org/jira/browse/CAMEL-7461

2014-12-03 12:44 GMT+01:00 contactreji <contactr...@gmail.com>:

> Thanks David
>
> A littlemore cleaner way was to use XSLT transformation. I was just
> interested in knowing if there is any provisions in Camel itself. Was
> trying
> to explore if idempotent consumer can work with more than 1 parameters as
> identifier.
>
> Following XSL code did the magic!
>
> *<xsl:stylesheet version="1.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
> <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
> <xsl:key name="currencyPair" match="Rate" use="concat(SourceCurrency,'
> ',TargetCurrency)"/>
>
> <xsl:template match="ExchangeRates">
>     <xsl:copy>
>         <xsl:for-each select="Rate[count(. |
> key('currencyPair',concat(SourceCurrency,' ',TargetCurrency))[1]) = 1]">
>             <xsl:copy-of select="."/>
>         </xsl:for-each>
>     </xsl:copy>
> </xsl:template>
> </xsl:stylesheet>
> *
>
>
> Cheers
> Reji
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Duplicate-Elimination-tp5760020p5760047.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
--
David J. M. Karlsen - http://www.linkedin.com/in/davidkarlsen

Reply via email to