4 Replies Latest reply on Dec 3, 2009 10:29 AM by jc Souvignet

    How process enriching message : pipeline / process / content-enricher ?

    jc Souvignet Newbie

      Hello,

       

      I use fuse esb 4.1.0.2.

      I process as proxy for webservice.

       

      When I use camel and a rout builder direcly between a in endpoint and the final service, the service is well done. I use this config in a camel route builder :

      from(SERVICE_PROCESS).to(SERVICE_ENDPOINT)

       

      Now I try to enrich the message :

       

      1. I try with process with this config :

      from(SERVICE_PROCESS).process(new PartUnEnrichProcessor()).to(SERVICE_ENDPOINT);

       

      2. I try with a pipeline with two différent config :

      from(SERVICE_PROCESS).pipeline( SERVICE_ENRICH, SERVICE_ENDPOINT);

      from(SERVICE_PROCESS).pipeline( SERVICE_ENRICH).to(SERVICE_ENDPOINT);

       

      3. I try in a eip configuration :

        <eip:content-enricher service="partun:PartUnWSProcess" endpoint="endpoint">

             <eip:enricherTarget>

                  <eip:exchange-target service="partun:PartUnWSEnrich" />

             </eip:enricherTarget>

             <eip:target>

                  <eip:exchange-target service="partun:PartUnWSwaHOST1" />

             </eip:target>

        </eip:content-enricher>

       

       

      Every time my message end at  SERVICE_ENRICH endpoint without be process by

      my final service endpoint.

       

       

      Any idea to help me to understand what is wrong in my logic ?

        • 1. Re: How process enriching message : pipeline / process / content-enricher ?
          Stan Lewis Novice

          With regards to your camel routes can you post the endpoints that you're using?  Have you turned on tracing to see if you can get more information from the logging?  Set trace="true" on the camelContext element.  Seems like you'd be getting an exception if the message doesn't make it to your "SERVICE_ENDPOINT" in the flow, any indication in the logging of this happening?  What does your processor do?  Have you tried replacing it with a dummy processor that does nothing to see if the flow still fails or not?

          • 2. Re: How process enriching message : pipeline / process / content-enricher ?
            jc Souvignet Newbie

            Hello slewis,

             

            trace="true" in camel context don't give me information in servicemix.log. Where logs should be found ?

             

            I try with ummy processor ans i have same result. I try also with just camel log and

            my process is not done. my SERVICE_ENDPOINT is a web service. 

             

             

            1. this route is good :

            from(SERVICE_PROCESS).to(SERVICE_ENDPOINT).to("log:PartDeuxRouteBuilderZ");

            Service is well done and result is correctly log in servicemix.log.

             

            2. this route is not good :

            from(SERVICE_PROCESS).to("log:PartDeuxRouteBuilder").to(SERVICE_ENDPOINT).to("log:PartDeuxRouteBuilderZ");

              MessageIn is the returned message. Loggue messages display MessageIn befrore en after call SERVICE_ENDPOINT. SERVICE_ENDPOINT is called.

             

            With a dummy processor, I have the same result as 2.

             

            Thanks in advance for your help,

             

            Edited by: jcs on Dec 3, 2009 1:23 PM

            • 3. Re: How process enriching message : pipeline / process / content-enricher ?
              Joe Luo Novice

               

              trace="true" in camel context don't give me information in servicemix.log. Where logs should be found ?

               

              You are using Java DSL, then in your RouteBuilder configure() function, you need to add a line:

              getContext().addInterceptStrategy(new Tracer());
              

              For more details about Camel tracer, please have a look at this link

              • 4. Re: How process enriching message : pipeline / process / content-enricher ?
                jc Souvignet Newbie

                Thanks ,

                 

                with this trace from camel I have identify that exchange pattern have bean modify to inOnly during log endpoint.

                 

                When I reset Echange pattern to InOut before call my end service, everything work fine :

                from(SERVICE_PROCESS).to("log:PartDeuxRouteBuilder").to(ExchangePattern.InOut,SERVICE_ENDPOINT).to("log:PartDeuxRouteBuilderZ");

                 

                Thanks for the help..