Although you may be wishing for a strict interpretation of
"idempotent", there are also practical interpretations, e.g.
the "idempotent" option for the "file://" component - the whole
purpose of this option is to read the file only once, even if it
remains in the directory.

On Thu, Jun 6, 2013 at 10:07 AM, jannecamel <[email protected]> wrote:
> At first look I was getting excited about idempotentConsumer - this would
> help me nicely in creating idempotent services.
>
> But looking closer, it does not seem to do what it says?
>
> Looks like it takes first request and processes it. Then if duplicate
> messages come, it just discards those.
>
> A true idempotent consumer would discard the duplicate messages AND return
> the same (cached) response as the first one got. For example if I have
> service add(x,y) and I call add(2,5) multiple times, each call should return
> 7. Now first returns 7 and duplicate ones return nothing. Or did I
> understand it wrong?
>
> http://www.enterpriseintegrationpatterns.com/IdempotentReceiver.html
> "The term idempotent is used in mathematics to describe a function that
> produces the same result if it is applied to itself, i.e. f(x) = f(f(x)). In
> Messaging this concepts translates into the a message that has the same
> effect whether it is received once or multiple times. This means that a
> message can safely be resent without causing any problems even if the
> receiver receives duplicates of the same message."
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/idempotentConsumer-is-not-idempotent-tp5733945.html
> Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to