Details
-
New Feature
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
None
-
None
-
Novice
Description
It may be useful to have a spring-cache based idempotent repository to ease the configuration of idempotent repository in spring xml based projects.
i.e.
<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd"> <bean id="cacheManager" class="org.infinispan.spring.provider.SpringRemoteCacheManagerFactoryBean"> <property name="configurationProperties"> <props> <prop key="infinispan.client.hotrod.server_list">127.0.0.1:11222</prop> <prop key="infinispan.client.hotrod.force_return_values">true</prop> </props> </property> </bean> <bean id="repo" class="org.apache.camel-spring.SpringCacheIdempotentRepository"> <constructor-arg ref="cacheManager"/> <constructor-arg value="idempotent"/> </bean> <camelContext xmlns="http://camel.apache.org/schema/spring"> <route id="infinispan-remote"> <from uri="direct:start" /> <idempotentConsumer messageIdRepositoryRef="repo" skipDuplicate="true"> <header>MessageId</header> <to uri="log:camel?level=INFO&showAll=true&multiline=true" /> </idempotentConsumer> </route> </camelContext> </beans>