You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Felix Thomas <fe...@gmail.com> on 2015/08/14 10:18:52 UTC

Muiltcast or SEDA (Performance)

hello,

      I have configured the below route, works fine . but have some doubts
based on it

    <threadPoolProfile id="customThreadPoolProfile" defaultProfile="true"
poolSize="10" maxPoolSize="20" maxQueueSize="1000"
allowCoreThreadTimeOut="false" />
    <route customId="false" id="routeDB" xmlns="
http://camel.apache.org/schema/spring">
        <from uri="timer://getData?period=2h"/>
        <setBody id="setBody1">
               <constant>select * from TEST</constant>
         </setBody>
        <to uri="jdbc:DS?outputType=StreamList" id="to1"/>
        <split id="split1" streaming="true" parallelProcessing="true">
            <simple>${body}</simple>
            <process  ref="CustomProcessor"/>
            <multicast>
                 <pipeline>
                    <to
uri="rabbitmq://localhost/HDFSXCHANGE?autoDelete=false&amp;queue=HDFSQUEUE&amp;username=guest&amp;password=guest&amp;routingKey=HDFS"
id="to2"/>
                 </pipeline>
                 <pipeline>
                    <process  ref="FieldsMappingProcessor"/>
                    <to
uri="rabbitmq://XXXXXXX/EXCHANGE?autoDelete=false&amp;queue=FQ&amp;username=Guest&amp;password=Guest&amp;routingKey=FD"
id="to3"/>
                 </pipeline>
            </multicast>
        </split>
    </route>

Flow :-  The Output from Customprocessor will be send to both a) a Queue
and b) another FieldsMappingProcessor and from that to a different queue.

1)  Considering the performance ,which is better using Multicast or SEDA
since there will be billions of processing in parallel . Currently  i have
kept in Multicast and pipe.

2)  Currently If there is an error FieldsMappingProcessor which is handled
in Global way , I am unable to stop the message being sent on the other
pipe its multicast.
     I want to stop the processing incase there is any error in any of the
pipe . So there is always equal number of messages in both queues.

regards,
Felix T