...
TODO: link to a page documenting the classpath / location elements for deploying code inside xbean SU
Configuring temporary message storage
Many of the pattern implementation need to store MessageExchanges temporarily. An example: the aggregator will need to keep track of the MessageExchange
it is aggregating. By default, the EIPs use a plain MemoryStoreFactory
to create in-memory stores, but there are other options. If you set the timeout
property on the MemoryStoreFactory
, it will evict old object from the in-memory store to avoid a memory leak. You can also use a JDBCStoreFactory
to store data in a database instead of in memory.
Example: to use an in-memory store with timeout for a storing active and closed aggregations in a <split-aggregator/>
, you can do
Code Block | ||||
---|---|---|---|---|
| ||||
<eip:split-aggregator service="test:aggregator" endpoint="endpoint"
storeFactory="#StoreFactory" closedAggregateStoreFactory="#StoreFactory">
<eip:target>
<eip:exchange-target service="test:trace5" />
</eip:target>
</eip:split-aggregator>
<bean id="StoreFactory" class="org.apache.servicemix.store.MemoryStoreFactory">
<property name="timeout" value="120000"/> <!-- 2 minute timeout -->
</bean>
|
Creating your own patterns
...