Hi:
    This problem is ok. Perhaps I don't install the last compiled camel su into 
servicemix runtime. Splitter pattern works
well like this:
   <route>
        <from ......../>
        <split>
                         <method ref="splitter" method="split"/>
                         <to 
uri="jbi:service:http://cobweb.hongbo.net.cn/default/master/router"; />
            </split> 
   </route>

The route endpoint marked with 'http://cobweb....../router' can received some 
messages splitted by splitter bean referenced with 'method' tag. 

But I have a new problem. The router endpoint isn't final destination. It is 
followed a recipientList endpoint. as follows:

   <route>
        <from ......../>
        <split>
                         <method ref="splitter" method="split"/>
                         <to 
uri="jbi:service:http://cobweb.hongbo.net.cn/default/master/router"; />
            </split> 
                <recipientList delimiter=",">
                        <header>CW_MSG_DESTINATION_ENDPOINT_URI</header>
                </recipientList>        
   </route>    
        
Or 
   <route>
        <from ......../>
        <split>
                         <method ref="splitter" method="split"/>
                         <to 
uri="jbi:service:http://cobweb.hongbo.net.cn/default/master/router"; />
                         <recipientList delimiter=",">
                                <header>CW_MSG_DESTINATION_ENDPOINT_URI</header>
                         </recipientList>       
            </split> 
   </route> 

   Above two patterns, the endpoint marked with attribute 
'CW_MSG_DESTINATION_ENDPOINT_URI' in message header received only one message 
after processing by 'router' endpoint. But the count of messages that 'Router' 
endpoint received is equal to the count of messages that splitter bean 
processed.

   Where are the other messages? Can I resovled it.  

                                                                                
         thanks. 
   

                                                                                
        
>Can you move the "to" tag out of the split like this ?
>   <split>
>       <method ref="splitter" method="split"/>
>   </split>
>   <to 
>uri="jbi:service:http://cobweb.hongbo.net.cn/default/master/router"; />
>
>Willem                         
>On Mon Mar 19 16:13:13 2012, wow wrote:
>> I use spliter to split a message, camel-context.xml as following:
>>
>> <beans .......>
>>      <bean id="splitter" 
>> class="com.hongbo.cobweb.master.split.SplitterMsgByConsumer" />
>>      
>>      <camelContext id="camelContext" 
>> xmlns="http://camel.apache.org/schema/spring";>
>>          <route>
>>              <from 
>> uri="jbi:service:http://cobweb.hongbo.net.cn/default/master/camel?mep=in-out";
>>  />
>>              <split>
>>                              <method ref="splitter" method="split"/>
>>                              <to 
>> uri="jbi:service:http://cobweb.hongbo.net.cn/default/master/router"; />
>>                      </split>
>>      <recipientList delimiter=",">
>>      <header>CW_MSG_DESTINATION_ENDPOINT_URI</header>
>>      </recipientList>                                
>>          </route>
>>      </camelContext>
>> </beans>
>>
>> when camel parse the route ,a exception is throwen:
>> Caused by: java.lang.IllegalArgumentException: Definition has no children on 
>> Split[bean{splitter, method=split} ->  []]
>>      at 
>> org.apache.camel.model.ProcessorDefinition.createChildProcessor(ProcessorDefinition.java:157)
>>      at 
>> org.apache.camel.model.SplitDefinition.createProcessor(SplitDefinition.java:95)
>>      at 
>> org.apache.camel.model.ProcessorDefinition.makeProcessor(ProcessorDefinition.java:437)
>>      at 
>> org.apache.camel.model.ProcessorDefinition.addRoutes(ProcessorDefinition.java:183)
>>      at 
>> org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:791)
>>      ... 47 more
>>
>>
>> "to" tag already exist in "split" tag, what does mean the exception?
>>
>>                                                                  thank you.
>>
>>
>
>
>
>-- 
>Willem
>----------------------------------
>FuseSource
>Web: http://www.fusesource.com
>Blog:    http://willemjiang.blogspot.com (English)
>         http://jnn.javaeye.com (Chinese)
>Twitter: willemjiang 
>Weibo: willemjiang 
>
>.

= = = = = = = = = = = = = = = = = = = =
                        

        致
礼!
 
                                 
        wow
        [email protected]
          2012-03-23

Reply via email to