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