You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Guillaume Yziquel <gu...@crossing-tech.com> on 2012/04/23 14:09:54 UTC

Tracing Camel routes, Unit of Work and From endpoint.

Hi.

I'm currently trying to trace Camel routes, and I'm wondering at how I
should query Camel Exchanges for the 'From endpoint' (i.e. the original
consumer). It seems to me that I have two options, that behave
differently, but I cannot figure out why...

[1] exchange.getFromEndpoint().getEndpointUri() seems to be the most
standard way to do things for 'standard' exchanges.

[2] exchange.getUnitOfWork().getRouteContext().getFrom seems to be more
adequate in the case of uow-managed transactions.

What's the right criterion to decide whether or not I should use [1] or
[2]?

Best regards,

-- 
Guillaume Yziquel
Crossing-Tech
Parc Scientifique EPFL

Re: Tracing Camel routes, Unit of Work and From endpoint.

Posted by Claus Ibsen <cl...@gmail.com>.
On Mon, Apr 23, 2012 at 4:34 PM, Guillaume Yziquel
<gu...@crossing-tech.com> wrote:
> Le Monday 23 Apr 2012 à 16:20:35 (+0200), Claus Ibsen a écrit :
>> Yeah go for #1.
>
> Always? Because I read from
>
> http://irclogs.dankulp.com/logs/irclogger_log/camel?date=2011-09-09,Fri&text=on
>
> that using unit of work seems to provide a more easily accessible
> history of messages. I was wondering to which extent
> getRouteContext().getFrom() may differ from [1].
>

Yeah UoW have more message history. But we would like for Camel 3.0 to
revisit this logic and offer
a better end user faced API for the message history EIP. So if you go
down that path then changes for Camel 3.0 may be likely.



>> On Mon, Apr 23, 2012 at 2:09 PM, Guillaume Yziquel
>> <gu...@crossing-tech.com> wrote:
>> >
>> > [1] exchange.getFromEndpoint().getEndpointUri() seems to be the most
>> > standard way to do things for 'standard' exchanges.
>> >
>> > [2] exchange.getUnitOfWork().getRouteContext().getFrom seems to be more
>> > adequate in the case of uow-managed transactions.
>
> --
> Guillaume Yziquel
> Crossing-Tech
> Parc Scientifique EPFL



-- 
Claus Ibsen
-----------------
CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Re: Tracing Camel routes, Unit of Work and From endpoint.

Posted by Guillaume Yziquel <gu...@crossing-tech.com>.
Le Monday 23 Apr 2012 à 16:20:35 (+0200), Claus Ibsen a écrit :
> Yeah go for #1.

Always? Because I read from

http://irclogs.dankulp.com/logs/irclogger_log/camel?date=2011-09-09,Fri&text=on

that using unit of work seems to provide a more easily accessible
history of messages. I was wondering to which extent
getRouteContext().getFrom() may differ from [1].

> On Mon, Apr 23, 2012 at 2:09 PM, Guillaume Yziquel
> <gu...@crossing-tech.com> wrote:
> >
> > [1] exchange.getFromEndpoint().getEndpointUri() seems to be the most
> > standard way to do things for 'standard' exchanges.
> >
> > [2] exchange.getUnitOfWork().getRouteContext().getFrom seems to be more
> > adequate in the case of uow-managed transactions.

-- 
Guillaume Yziquel
Crossing-Tech
Parc Scientifique EPFL

Re: Tracing Camel routes, Unit of Work and From endpoint.

Posted by Claus Ibsen <cl...@gmail.com>.
Yeah go for #1.


On Mon, Apr 23, 2012 at 2:09 PM, Guillaume Yziquel
<gu...@crossing-tech.com> wrote:
> Hi.
>
> I'm currently trying to trace Camel routes, and I'm wondering at how I
> should query Camel Exchanges for the 'From endpoint' (i.e. the original
> consumer). It seems to me that I have two options, that behave
> differently, but I cannot figure out why...
>
> [1] exchange.getFromEndpoint().getEndpointUri() seems to be the most
> standard way to do things for 'standard' exchanges.
>
> [2] exchange.getUnitOfWork().getRouteContext().getFrom seems to be more
> adequate in the case of uow-managed transactions.
>
> What's the right criterion to decide whether or not I should use [1] or
> [2]?
>
> Best regards,
>
> --
> Guillaume Yziquel
> Crossing-Tech
> Parc Scientifique EPFL



-- 
Claus Ibsen
-----------------
CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/