spring-projects / spring-integration

Spring Integration provides an extension of the Spring programming model to support the well-known Enterprise Integration Patterns (EIP)
http://projects.spring.io/spring-integration/
Apache License 2.0
1.54k stars 1.11k forks source link

Provide better support for Idempotent Receiver pattern [INT-2426] #6408

Closed spring-operator closed 10 years ago

spring-operator commented 12 years ago

Oleg Zhurakousky opened INT-2426 and commented

Although as you can see from the forum discussion it is already supported by the framework via many different components (Filter, Router, Aggragator) we probably need a a more formal support for something like \


Reference URL: http://forum.springsource.org/showthread.php?122716-Idempotent-Receiver

Issue Links:

Referenced from: pull request https://github.com/spring-projects/spring-integration/pull/1286

7 votes, 8 watchers

spring-operator commented 11 years ago

Artem Bilan commented

Hey there! Let me express my view. It may look like:

<idempotent-filter id="fooIdempotent" input-channel="in" output-channel="out" disracd-channel="duplicate"
                   message-store="messageStore" expression="payload.id + '|' + payload.date"/>

where:

It should be covered by MessageGroup, because I may have several similar filters in the application. We can use expression evaluation result 'idempotent key' as message id for store, or iterate over entire group and compare results for each message.

I don't know... May be we can follow with Cammel expirience too (http://camel.apache.org/idempotent-consumer.html) and add other usefull options.

Of course, the case "Make balance $110" is not considered: it's fully up to the business logic of concrete application.

Cheers

spring-operator commented 10 years ago

Gary Russell commented

Merged