On Mon, Mar 4, 2013 at 10:35 PM, garrydias <garryd...@gmail.com> wrote:
> Hi, Friends
>
> #1) consider the route below:
>
> /               <camel:route id="routeContentEntry" 
> routePolicyRef="myRoutePolicy">
>                         <camel:from ref="amqContentEntry" />
>                         <camel:to uri="bean:contentConsumer?method=consume" />
>                         <camel:to ref="legacyDestinationEntry" />
>                 </camel:route>/
>
> when my app runs that route, my RoutePolicy bean perform onExchangeBegin and
> onExchangeDone methods which prints /"onExchangeBegin - Total headers: 30"/
> and /"onExchangeDone - Total headers: 30"/, respectively.
>
>
> #2) Changing my route like that:
>
> /               <camel:route id="routeContentEntry" 
> routePolicyRef="myRoutePolicy">
>                         <camel:from ref="amqContentEntry" />
>                         <camel:to uri="bean:contentConsumer?method=consume" />
>                         *<camel:routingSlip>
>                                 <camel:header>amq_destination_1</camel:header>
>                         </camel:routingSlip>*
>                 </camel:route>/
>

Can you try adding a step after routingSlip

... routing slip here
<to uri="log:foo?showHeaders=true"/>
</camel:route>

And is amq_destination_1 the same destination as you use in the #1 route?


> when my app runs that route, my RoutePolicy bean perform onExchangeBegin and
> onExchangeDone methods which prints /"onExchangeBegin - Total headers: 30"/
> and /*"onExchangeDone - Total headers: 0"*/, respectively.
>
>
> What the route #2 did to my message headers in the onExchangeDone execution?
>
>
> /Method bodies:/
> public void onExchangeBegin(Route route, Exchange exchange)
> {
>         System.out.println("onExchangeBegin - Total headers: " +
> exchange.getIn().getHeaders().size());
> }
>
>
> public void onExchangeDone(Route route, Exchange exchange)
> {
>         System.out.println("onExchangeDone - Total headers: " +
> exchange.getIn().getHeaders().size());
> }
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Headers-are-disapearing-in-RoutePolicy-onExchangeDone-tp5728492.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cib...@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Reply via email to