You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Quinn Stevenson <qu...@pronoia-solutions.com> on 2016/09/02 14:19:53 UTC
Re: Adding options to default idempotent File Repo
You are correct - to customize the configuration for an Idempotent Repository, you need to create a bean for the repository and set it’s specific properties.
The Idempotent Repository used by the file component is pluggable - it just needs to implement the org.apache.camel.spi.IdempotentRepository interface. Therefore, it doesn’t support customizing the repository via the file URI.
BTW - the file component uses the MemoryMessageIdRepository by default
HTH
> On Aug 22, 2016, at 7:57 AM, JSmith <js...@gmail.com> wrote:
>
> How do I add options to the default Idempotent File Repository using the
> Spring DSL?
>
> Basically I want to change the "eager" option to false because it seems like
> it will fix my issue of not inserting a name into the Repo if I set
> Exchange.ROUTE_STOP = true.
>
> But it seems the only way is to have a messy block of code like:
>
> <bean id="myFileStore"
> class="org.apache.camel.processor.idempotent.FileIdempotentRepository">
> <property name="fileStore" value="myFileStore.txt"/>
> <property name="maxFileStoreSize" value="512000000"/>
> <property name="cacheSize" value="100000"/>
> </bean>
>
> <camelContext>
> .
> .
> .
> <route>
> <from uri="x" />
> <idempotentConsumer messageIdRepositoryRef="myFileStore"
> eager="false">
> <header>${file:name}-${file:modified}</header>
> <to uri="y" />
> </idempotentConsumer>
> </route>
> </camelContext>
>
>
> Right? That's the only way to manipulate the default options for the File
> Idempotent Consumer? Or am I missing something here?
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Adding-options-to-default-idempotent-File-Repo-tp5786675.html
> Sent from the Camel - Users mailing list archive at Nabble.com.