camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rohitbrai <rohitb...@gmail.com>
Subject Split using tokenize on header
Date Fri, 08 May 2009 12:58:29 GMT

I have a message which has -
Header 
    "To" - "abc@sdf.com,xyz@dsfsdf.com,sdaf@serr.com"
Body
    Hello

onthis message I tried -
   
from("jms:queue:new.test1").splitter(header("To").tokenize(",")).to("jms:queue:new.test2");

and I was expecting 3 entries on test2 queue
Header 
    "To" - "abc@sdf.com"
Body
    Hello

Header 
    "To" - "xyz@dsfsdf.com"
Body
    Hello

Header 
    "To" - "sdaf@serr.com"
Body
    Hello


But instead I got 3 messages on test2 queue like
Header 
    "To" - "abc@sdf.com,xyz@dsfsdf.com,sdaf@serr.com"
Body
    abc@sdf.com

Header 
    "To" - "abc@sdf.com,xyz@dsfsdf.com,sdaf@serr.com"
Body
    xyz@dsfsdf.com

Header 
    "To" - "abc@sdf.com,xyz@dsfsdf.com,sdaf@serr.com"
Body
    sdaf@serr.com

So I guess, I am doing it and even understanding it wrong.

Can anyone here guide me how to handle this situation.

Thanks and Regards,



-- 
View this message in context: http://www.nabble.com/Split-using-tokenize-on-header-tp23445496p23445496.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Mime
View raw message