You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by erik_romson <er...@zenior.no> on 2017/03/08 09:39:25 UTC

what does camel.transactionKey actually mean

in the documentation 

/The id of the transaction for transacted exchanges. Note the id is not
unique, but its the id of the transaction template that marks the
transaction boundary for the given transaction. Hence we decided to name the
key transactionKey and not transactionID to point out this fact./

Does this mean that

       getContext().setUseMDCLogging(true);

        from("direct:mainroute")
                .transacted()
                .routeId("ROUTEID_MAINROUTE")
                .log(LoggingLevel.INFO, "main route")
                .split(...).streaming()
                   .to("seda:subroute")
                .end;

        from("seda:subroute")
                .transacted("PROPAGATION_REQUIRES_NEW")
                .routeId("ROUTEID_SUBROUTE")
                .log(LoggingLevel.INFO, "subroute route")
                ....;

that the transaction key (example when logging) in "subroute route" is
always the same or different for each time it is called.

When are they same?

Regards
Erik Romson




--
View this message in context: http://camel.465427.n5.nabble.com/what-does-camel-transactionKey-actually-mean-tp5795067.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: what does camel.transactionKey actually mean

Posted by Claus Ibsen <cl...@gmail.com>.
Ask the computer ;)

Its the id of the transaction template and it ought to be different
when you do these transaction switches.

On Wed, Mar 8, 2017 at 10:39 AM, erik_romson <er...@zenior.no> wrote:
> in the documentation
>
> /The id of the transaction for transacted exchanges. Note the id is not
> unique, but its the id of the transaction template that marks the
> transaction boundary for the given transaction. Hence we decided to name the
> key transactionKey and not transactionID to point out this fact./
>
> Does this mean that
>
>        getContext().setUseMDCLogging(true);
>
>         from("direct:mainroute")
>                 .transacted()
>                 .routeId("ROUTEID_MAINROUTE")
>                 .log(LoggingLevel.INFO, "main route")
>                 .split(...).streaming()
>                    .to("seda:subroute")
>                 .end;
>
>         from("seda:subroute")
>                 .transacted("PROPAGATION_REQUIRES_NEW")
>                 .routeId("ROUTEID_SUBROUTE")
>                 .log(LoggingLevel.INFO, "subroute route")
>                 ....;
>
> that the transaction key (example when logging) in "subroute route" is
> always the same or different for each time it is called.
>
> When are they same?
>
> Regards
> Erik Romson
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/what-does-camel-transactionKey-actually-mean-tp5795067.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2