Thanks John for the reply

I tend to agree with you on POJO doing the parsing dirty work.
Creating new POJO is actually the thing we want to avoid. Our team
prefer configuring Spring DSL rather than using POJO. On this case
where the parsing will be too complex, however, POJO maybe the
cleanest solution



On Mon, Apr 4, 2011 at 3:35 PM, John McDonald <mcdon...@gmail.com> wrote:
> 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
>
>



-- 
Sent using Telkomsel network
Twitter: @md_ray
Email/IM: saviour...@gmail.com and md_...@yahoo.com

Reply via email to