You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by simafengyun <27...@qq.com> on 2014/06/24 04:26:36 UTC
question about seda component
Hi All,
I have one question about the seda component. there is a parameter
concurrentConsumers. I am confused about it. Sample code as below
<route id="publishData" autoStartup="true" startupOrder="100">
<from
uri="seda:trades?size=1000000&amp;<b>concurrentConsumers=100*"/>
<to uri="testProcessor"/>
<to uri="DB?testtable"/>
</route>
concurrentConsumers=100, does it means it the route publishData will use 100
threads to receive data from the seda?
--
View this message in context: http://camel.465427.n5.nabble.com/question-about-seda-component-tp5752720.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: question about seda component
Posted by simafengyun <27...@qq.com>.
If I use akka-camel to do it , sample code as below.* If I set
concurrentConsumers=100 then Will it stilluse 100 threads to pull messages
off the queue and execute your route in parallel??*
public class AkkaConsumerActor extends UntypedConsumerActor {
private static final Logger logger = Loggers.getLogger();
public String getEndpointUri() {
return "seda:trades?size=1000000&*concurrentConsumers=20*";
}
public void onReceive(Object message) {
logger.info("thread id: " + Thread.currentThread().getId());
}
}
--
View this message in context: http://camel.465427.n5.nabble.com/question-about-seda-component-tp5752720p5752723.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: question about seda component
Posted by boday <be...@initekconsulting.com>.
yep, SEDA uses a BlockingQueue and is asynchronous from the producer (the
process that sends to your seda:trades endpoint)...so if you specify
concurrentConsumers=100 then it will use 100 threads to pull messages off
the queue and execute your route in parallel...
simafengyun wrote
> Hi All,
>
> I have one question about the seda component. there is a parameter
> concurrentConsumers. I am confused about it. Sample code as below
>
>
> <route id="publishData" autoStartup="true" startupOrder="100">
> <from
> uri="seda:trades?size=1000000&amp;<b>concurrentConsumers=100
*
> "/>
>
> <to uri="testProcessor"/>
>
> <to uri="DB?testtable"/>
>
> </route>
> concurrentConsumers=100, does it means it the route publishData will use
> 100 threads to receive data from the seda?
-----
Ben O'Day
IT Consultant -http://consulting-notes.com
--
View this message in context: http://camel.465427.n5.nabble.com/question-about-seda-component-tp5752720p5752721.html
Sent from the Camel - Users mailing list archive at Nabble.com.