You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by David Karlsen <da...@gmail.com> on 2014/05/22 15:27:37 UTC
Compound expression for idempotent consumer
Hi.
I'm wanting to setup a idempotent consumer, but combine several expressions
as the key.
(an xpath-expression on the payload + a property set on the exchange.
Is this possible?
<idempotentConsumer messageIdRepositoryRef="myMessageIdempotentRepository"
xmlns:somens="someNs">
<camel:xpath>//somens:MsgId/text()</camel:xpath> <--only xpath - works, but:
<camel:expressionDefinition> <--how can I use this to combine several
expressions?
<camel:xpath>//somens:MsgId/text()</camel:xpath>
<... use property on exchange to combine them >
</camel:expressionDefinition>
.....
--
--
David J. M. Karlsen - http://www.linkedin.com/in/davidkarlsen
Re: Compound expression for idempotent consumer
Posted by Claus Ibsen <cl...@gmail.com>.
Hi
Not so easy in pure XML. Write a java bean with a method and do
whatever you want there.
There is ExpressioBuilder to combine them using and/or etc.
On Thu, May 22, 2014 at 3:27 PM, David Karlsen <da...@gmail.com> wrote:
> Hi.
>
> I'm wanting to setup a idempotent consumer, but combine several expressions
> as the key.
> (an xpath-expression on the payload + a property set on the exchange.
>
> Is this possible?
>
> <idempotentConsumer messageIdRepositoryRef="myMessageIdempotentRepository"
> xmlns:somens="someNs">
>
> <camel:xpath>//somens:MsgId/text()</camel:xpath> <--only xpath - works, but:
>
> <camel:expressionDefinition> <--how can I use this to combine several
> expressions?
> <camel:xpath>//somens:MsgId/text()</camel:xpath>
> <... use property on exchange to combine them >
> </camel:expressionDefinition>
> .....
>
> --
> --
> David J. M. Karlsen - http://www.linkedin.com/in/davidkarlsen
--
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/