If you are using Spring then I would be looking at a POJO to do this parsing work - routing to it using the beanRef - this would encapsulate your string manipulation and leave camel to perform delivery and routing. There are predicates and conditionals you could use in your dsl - but for my taste this wouldn't give me the transparency and simplicity of testing I would like. My inclination is to use Camel for the heavy lifting and pojos or processors for the fine grained stuff
On 4 Apr 2011, at 09:24, Muhammad Rayhan wrote: > Hi, this is my first email to this mailing-list. Although already > knowing for some time, I only recently got the opportunity to deploy > integration solution using Apache Camel. And Camel did wonder! I and > my fellow friends were amazed by the concept and simplicity of Apache > Camel > > Now, I have another problem to solve using Camel. One of my tasks to > be done is doing string processing / transformation. I need to parse > and extract several information from a text log. The string format > itself is fixed, but string is not in comma separated value. For > example, the text is: > > 2011-04-04 14:34:05,003 INFO - cli_to_gw submit_sm_req text ip > :10.2.xxxxx:37xxx to:62xxxxx msg:Congratulations, the product ABC > activation to subscriber DEF is successful. The serial number is XYZ. > from:xxxxx > > I want to extract only ABC, DEF and XYZ from the text log. In order to > avoid heavy changes in our production environment, I intend to use > Spring XML DSL to configure my routes. Is it possible to do so? What > functions should I use? I have no problem filtering the log to only > process certain type of log (using 'regex' simple operator), but have > no idea of extract those information using Spring XML. > > Thanks in advance :) > > > -- > Twitter: @md_ray > Email/IM: saviour...@gmail.com