Well, I've got something working, but it doesn't quite feel like "The Camel Way": <beans:bean id="_sedaComponent" class="org.apache.camel.component.seda.SedaComponent"> <beans:property name="camelContext" ref="camel" /> </beans:bean>
<beans:bean id="customerEventQueue" factory-bean="_sedaComponent" factory-method="createEndpoint"> <beans:constructor-arg value="seda:customerChangeEvent?size=${camel.customer.event.queue.size}&concurrentConsumers=${camel.customer.event.queue.concurrentConsumers}" /> <beans:constructor-arg value="" /> <beans:constructor-arg> <beans:map> <beans:entry key="size" value="${camel.customer.event.queue.size}" /> <beans:entry key="concurrentConsumers" value="${camel.customer.event.queue.concurrentConsumers}" /> </beans:map> </beans:constructor-arg> </beans:bean> Comments/suggestions are definitely welcome! Doug On Thu, Jun 18, 2009 at 1:11 PM, Doug Douglass <douglass.d...@gmail.com>wrote: > I'd like to move some SEDA endpoint options out of the Camel XML > configuration and into a Spring PropertyPlaceholderConfigurer, but I'm > struggling a bit. > > Here's a snip of the current Camel XML with the URIs I'm trying to > configure marked with "-->": > > <camelContext> > <route> > <from uri="timer://poller?period=300000" /> > <to uri="bean:customerChangeEventService?methodName=getEvents" /> > <splitter> > <el>${in.body}</el> > <idempotentConsumer messageIdRepositoryRef="eventIdRepository"> > <el>${in.body.eventId}</el> > --> <to uri="seda:customerChangeEvent?size=6000" /> > </idempotentConsumer> > </splitter> > <onException> > <exception>java.lang.Throwable</exception> > <to uri="seda:eventProcessingErrors"/> > </onException> > </route> > > <route> > --> <from uri="seda:customerChangeEvent?size=6000" /> > ... > </route> > > ... > </camelContext> > > In practice, the configuration may also include the concurrentConsumers > option. > > Optimistically, I configured a PropertyPlaceholderConfigurer and tried > changing the URIs to > "seda:customerChangeEvent?size=${camel.customer.event.queue.size}", but the > property isn't replaced, and camel complains when it tries to > convert ${camel.customer.event.queue.size} into an integer. > > Now I'm struggling trying to configure/instantiate a SedaComponent directly > via Spring beans XML. > > Any pointers to examples? > > Anyone care to provide a quick example? > > If it helps, this project is using Camel 1.6.1. > > TIA, > Doug >