You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by "Kasim Sert (Ibtech-Software Infrastructure)" <ka...@ibtech.com.tr> on 2016/06/09 08:55:18 UTC
Printing message history during root debug
Hi,
Is it possible to print Message history (which is printed in case of errors like below) during a route debug without error conditions. I just want to learn how did I reach at that bean currently I am debugging. Is that possible ?
Message History
---------------------------------------------------------------------------------------------------------------------------------------
RouteId ProcessorId Processor Elapsed (ms)
[route25 ] [route25 ] [direct://FT_EXPORT_FILE ] [ 0]
[route25 ] [to109 ] [direct:pollOnDemand ] [ 0]
[route19 ] [bean179 ] [bean[com.abc.mft.MftTransferGroup@c21c663c] ] [ 0]
[route19 ] [choice1 ] [when[{header{header(pendingTranferExists)} == true}]choice[] ] [ 0]
[route19 ] [bean180 ] [bean[com.abc.mft.helper.CommonHelper] ] [ 0]
[Facebook]<http://www.facebook.com/Finansbank> [Twitter] <http://twitter.com/finansbank>
[https://www.finansbank.com.tr/Disclaimer/BannerImages.aspx?date=09.06.201611:5500]<https://www.finansbank.com.tr/Disclaimer/Bannerlink.aspx?date=09.06.201611:5500>
Bu e-posta'n?n i?erdi?i bilgiler (ekleri dahil olmak ?zere) gizlidir. Onay?m?z olmaks?z?n ???nc? ki?ilere a?iklanamaz. Bu mesaj?n g?nderilmek istendi?i ki?i de?ilseniz, l?tfen mesaj? sisteminizden derhal siliniz. IBTech A.?. bu mesaj?n i?erdi?i bilgilerin do?rulu?u veya eksiksiz oldu?u konusunda bir garanti vermemektedir. Bu nedenle bilgilerin ne ?ekilde olursa olsun i?eri?inden, iletilmesinden, al?nmas?ndan, saklanmas?ndan sorumlu de?ildir. Bu mesaj?n i?eri?i yazar?na ait olup, IBTech A.?.'nin g?r??lerini i?ermeyebilir.
The information contained in this e-mail (including any attachments)is confidential. It must not be disclosed to any person without our authority. If you are not the intended recipient, please delete it from your system immediately. IBTech A.S. makes no warranty as to the accuracy or completeness of any information contained in this message and hereby excludes any liability of any kind for the information contained therein or for the information transmission, reception, storage or use of such in any way whatsoever. Any opinions expressed in this message are those of the author and may not necessarily reflect the opinions of IBTech A.S.
Re: Printing message history during root debug
Posted by Claus Ibsen <cl...@gmail.com>.
No, but you can look at the exchange in the debugger, it has a
property for message history with a list of all the nodes it has
passed, then you can look in there.
List<MessageHistory> list =
exchange.getProperty(Exchange.MESSAGE_HISTORY, List.class);
On Thu, Jun 9, 2016 at 2:20 PM, Kasim Sert (Ibtech-Software
Infrastructure) <ka...@ibtech.com.tr> wrote:
> Hi Claus,
>
> Is there a way to do this without changing the route, for instance in eclipse display window invoking some methods ?
>
> I tried to print with expression below but not working.
>
> org.apache.camel.builder.SimpleBuilder.simple("${messageHistory}").evaluate(org.apache.camel.builder.ExchangeBuilder.anExchange(getContext()).build(),String.class)
>
> -----Original Message-----
> From: Claus Ibsen [mailto:claus.ibsen@gmail.com]
> Sent: Thursday, June 09, 2016 12:01 PM
> To: users@camel.apache.org
> Subject: Re: Printing message history during root debug
>
> If you are using Camel 2.17 you can use simple language to get it, and then log it easily
>
> .log("${messageHistory}")
>
>
>
> On Thu, Jun 9, 2016 at 10:55 AM, Kasim Sert (Ibtech-Software
> Infrastructure) <ka...@ibtech.com.tr> wrote:
>> Hi,
>>
>> Is it possible to print Message history (which is printed in case of errors like below) during a route debug without error conditions. I just want to learn how did I reach at that bean currently I am debugging. Is that possible ?
>>
>>
>> Message History
>> ---------------------------------------------------------------------------------------------------------------------------------------
>> RouteId ProcessorId Processor Elapsed (ms)
>> [route25 ] [route25 ] [direct://FT_EXPORT_FILE ] [ 0]
>> [route25 ] [to109 ] [direct:pollOnDemand ] [ 0]
>> [route19 ] [bean179 ] [bean[com.abc.mft.MftTransferGroup@c21c663c] ] [ 0]
>> [route19 ] [choice1 ] [when[{header{header(pendingTranferExists)} == true}]choice[] ] [ 0]
>> [route19 ] [bean180 ] [bean[com.abc.mft.helper.CommonHelper] ] [ 0]
>>
>>
>> [Facebook]<http://secure-web.cisco.com/1meywFzt3s5XpduNtje3NllkoDbv0r_
>> iP5bNGy5psx9M8o6d3uyfM6YnH3zfkzrrKKdsUggHYqvD7u3RC3DO6XVS6apoFVVjPrOxI
>> nsCkx0YjITDzxqnJ-rIlOVViPhPTi-Y_ohVnTj4-mWmcminusaxPat_Ta0Wd5h-KrT0TA1
>> WIQwQ7xWBRxjrGmYV1f6tgwWd11X7H0y6x003tIqUqyAk_inV3-3Kz_zAE4EclamEcozl7
>> Np1hk-qtt7Nog1hTqvNhIZAZ4VC06pAfXVhpog/http%3A%2F%2Fwww.facebook.com%2
>> FFinansbank> [Twitter] <http://twitter.com/finansbank>
>>
>> [https://www.finansbank.com.tr/Disclaimer/BannerImages.aspx?date=09.06
>> .201611:5500]<https://www.finansbank.com.tr/Disclaimer/Bannerlink.aspx
>> ?date=09.06.201611:5500>
>>
>>
>> Bu e-posta'n?n i?erdi?i bilgiler (ekleri dahil olmak ?zere) gizlidir. Onay?m?z olmaks?z?n ???nc? ki?ilere a?iklanamaz. Bu mesaj?n g?nderilmek istendi?i ki?i de?ilseniz, l?tfen mesaj? sisteminizden derhal siliniz. IBTech A.?. bu mesaj?n i?erdi?i bilgilerin do?rulu?u veya eksiksiz oldu?u konusunda bir garanti vermemektedir. Bu nedenle bilgilerin ne ?ekilde olursa olsun i?eri?inden, iletilmesinden, al?nmas?ndan, saklanmas?ndan sorumlu de?ildir. Bu mesaj?n i?eri?i yazar?na ait olup, IBTech A.?.'nin g?r??lerini i?ermeyebilir.
>>
>> The information contained in this e-mail (including any attachments)is confidential. It must not be disclosed to any person without our authority. If you are not the intended recipient, please delete it from your system immediately. IBTech A.S. makes no warranty as to the accuracy or completeness of any information contained in this message and hereby excludes any liability of any kind for the information contained therein or for the information transmission, reception, storage or use of such in any way whatsoever. Any opinions expressed in this message are those of the author and may not necessarily reflect the opinions of IBTech A.S.
>
>
>
> --
> Claus Ibsen
> -----------------
> http://secure-web.cisco.com/1K-Aq_af5GUW8mxofqmD2R9SzXt9eHVU8W1ob1ZVYjKZIJWD79i3Xs2DEKNqSb3XjMGTx3VE_o2n1J9ra25BU0t8TUheOrHdoOjc4nA_N4MMkIY-R9ZmNw6tyamvs6jVK8Dj8UYGRkWg6IbXdqKjwppjisBNrHf7oAsMIOKcRtmyQRvhmXEndktZR3Tgp4M7NC-1JH6p42UZGujHtZfy9SF1hGm3vFQmBdA_zOacaGKVoshgdo-slmPmLuRYQMKIw/http%3A%2F%2Fdavsclaus.com @davsclaus Camel in Action 2: https://secure-web.cisco.com/1f-Lgx_lqKiWISJJvIFIaSSO8YA63_gYpYQmzeELhe1ImFSw5_AqIFwDkiPXtWsNro9pxYiARwsjn0Ld-HDu4cj3b0OCnKXGd-yS4644Y_2gYQA7dJ7cRWQXg_h6Vice8_QexTv5cv_G8kOOLMNEhldHzBl8QdbDsDriWYXY7bKxZccTKjAbbFWOp8L_d6qYAw81lsDbimBEUegB4KB5sJo9v38sk8nsWBXKIYHa2n6wmO3r9K67W7h6c8pQW7fmK/https%3A%2F%2Fwww.manning.com%2Fibsen2
>
>
>
> Bu e-posta'nin içerdigi bilgiler (ekleri dahil olmak
> üzere) gizlidir. Onayimiz olmaksizin üçüncü kisilere açiklanamaz. Bu mesajin
> gönderilmek istendigi kisi degilseniz, lütfen mesaji sisteminizden derhal
> siliniz. IBTech A.S. bu mesajin içerdigi bilgilerin dogrulugu veya eksiksiz
> oldugu konusunda bir garanti vermemektedir. Bu nedenle bilgilerin ne sekilde
> olursa olsun içeriginden, iletilmesinden, alinmasindan, saklanmasindan sorumlu
> degildir. Bu mesajin içerigi yazarina ait olup, IBTech A.S.'nin görüslerini
> içermeyebilir.
>
> The information contained in this e-mail (including any
> attachments)is confidential. It must not be disclosed to any person without our
> authority. If you are not the intended recipient, please delete it from your
> system immediately. IBTech A.S. makes no warranty as to the accuracy or
> completeness of any information contained in this message and hereby excludes
> any liability of any kind for the information contained therein or for the
> information transmission, reception, storage or use of such in any way
> whatsoever. Any opinions expressed in this message are those of the author and
> may not necessarily reflect the opinions of IBTech
> A.S.
--
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2
RE: Printing message history during root debug
Posted by "Kasim Sert (Ibtech-Software Infrastructure)" <ka...@ibtech.com.tr>.
Hi Claus,
Is there a way to do this without changing the route, for instance in eclipse display window invoking some methods ?
I tried to print with expression below but not working.
org.apache.camel.builder.SimpleBuilder.simple("${messageHistory}").evaluate(org.apache.camel.builder.ExchangeBuilder.anExchange(getContext()).build(),String.class)
-----Original Message-----
From: Claus Ibsen [mailto:claus.ibsen@gmail.com]
Sent: Thursday, June 09, 2016 12:01 PM
To: users@camel.apache.org
Subject: Re: Printing message history during root debug
If you are using Camel 2.17 you can use simple language to get it, and then log it easily
.log("${messageHistory}")
On Thu, Jun 9, 2016 at 10:55 AM, Kasim Sert (Ibtech-Software
Infrastructure) <ka...@ibtech.com.tr> wrote:
> Hi,
>
> Is it possible to print Message history (which is printed in case of errors like below) during a route debug without error conditions. I just want to learn how did I reach at that bean currently I am debugging. Is that possible ?
>
>
> Message History
> ---------------------------------------------------------------------------------------------------------------------------------------
> RouteId ProcessorId Processor Elapsed (ms)
> [route25 ] [route25 ] [direct://FT_EXPORT_FILE ] [ 0]
> [route25 ] [to109 ] [direct:pollOnDemand ] [ 0]
> [route19 ] [bean179 ] [bean[com.abc.mft.MftTransferGroup@c21c663c] ] [ 0]
> [route19 ] [choice1 ] [when[{header{header(pendingTranferExists)} == true}]choice[] ] [ 0]
> [route19 ] [bean180 ] [bean[com.abc.mft.helper.CommonHelper] ] [ 0]
>
>
> [Facebook]<http://secure-web.cisco.com/1meywFzt3s5XpduNtje3NllkoDbv0r_
> iP5bNGy5psx9M8o6d3uyfM6YnH3zfkzrrKKdsUggHYqvD7u3RC3DO6XVS6apoFVVjPrOxI
> nsCkx0YjITDzxqnJ-rIlOVViPhPTi-Y_ohVnTj4-mWmcminusaxPat_Ta0Wd5h-KrT0TA1
> WIQwQ7xWBRxjrGmYV1f6tgwWd11X7H0y6x003tIqUqyAk_inV3-3Kz_zAE4EclamEcozl7
> Np1hk-qtt7Nog1hTqvNhIZAZ4VC06pAfXVhpog/http%3A%2F%2Fwww.facebook.com%2
> FFinansbank> [Twitter] <http://twitter.com/finansbank>
>
> [https://www.finansbank.com.tr/Disclaimer/BannerImages.aspx?date=09.06
> .201611:5500]<https://www.finansbank.com.tr/Disclaimer/Bannerlink.aspx
> ?date=09.06.201611:5500>
>
>
> Bu e-posta'n?n i?erdi?i bilgiler (ekleri dahil olmak ?zere) gizlidir. Onay?m?z olmaks?z?n ???nc? ki?ilere a?iklanamaz. Bu mesaj?n g?nderilmek istendi?i ki?i de?ilseniz, l?tfen mesaj? sisteminizden derhal siliniz. IBTech A.?. bu mesaj?n i?erdi?i bilgilerin do?rulu?u veya eksiksiz oldu?u konusunda bir garanti vermemektedir. Bu nedenle bilgilerin ne ?ekilde olursa olsun i?eri?inden, iletilmesinden, al?nmas?ndan, saklanmas?ndan sorumlu de?ildir. Bu mesaj?n i?eri?i yazar?na ait olup, IBTech A.?.'nin g?r??lerini i?ermeyebilir.
>
> The information contained in this e-mail (including any attachments)is confidential. It must not be disclosed to any person without our authority. If you are not the intended recipient, please delete it from your system immediately. IBTech A.S. makes no warranty as to the accuracy or completeness of any information contained in this message and hereby excludes any liability of any kind for the information contained therein or for the information transmission, reception, storage or use of such in any way whatsoever. Any opinions expressed in this message are those of the author and may not necessarily reflect the opinions of IBTech A.S.
--
Claus Ibsen
-----------------
http://secure-web.cisco.com/1K-Aq_af5GUW8mxofqmD2R9SzXt9eHVU8W1ob1ZVYjKZIJWD79i3Xs2DEKNqSb3XjMGTx3VE_o2n1J9ra25BU0t8TUheOrHdoOjc4nA_N4MMkIY-R9ZmNw6tyamvs6jVK8Dj8UYGRkWg6IbXdqKjwppjisBNrHf7oAsMIOKcRtmyQRvhmXEndktZR3Tgp4M7NC-1JH6p42UZGujHtZfy9SF1hGm3vFQmBdA_zOacaGKVoshgdo-slmPmLuRYQMKIw/http%3A%2F%2Fdavsclaus.com @davsclaus Camel in Action 2: https://secure-web.cisco.com/1f-Lgx_lqKiWISJJvIFIaSSO8YA63_gYpYQmzeELhe1ImFSw5_AqIFwDkiPXtWsNro9pxYiARwsjn0Ld-HDu4cj3b0OCnKXGd-yS4644Y_2gYQA7dJ7cRWQXg_h6Vice8_QexTv5cv_G8kOOLMNEhldHzBl8QdbDsDriWYXY7bKxZccTKjAbbFWOp8L_d6qYAw81lsDbimBEUegB4KB5sJo9v38sk8nsWBXKIYHa2n6wmO3r9K67W7h6c8pQW7fmK/https%3A%2F%2Fwww.manning.com%2Fibsen2
Bu e-posta'nin içerdigi bilgiler (ekleri dahil olmak
üzere) gizlidir. Onayimiz olmaksizin üçüncü kisilere açiklanamaz. Bu mesajin
gönderilmek istendigi kisi degilseniz, lütfen mesaji sisteminizden derhal
siliniz. IBTech A.S. bu mesajin içerdigi bilgilerin dogrulugu veya eksiksiz
oldugu konusunda bir garanti vermemektedir. Bu nedenle bilgilerin ne sekilde
olursa olsun içeriginden, iletilmesinden, alinmasindan, saklanmasindan sorumlu
degildir. Bu mesajin içerigi yazarina ait olup, IBTech A.S.'nin görüslerini
içermeyebilir.
The information contained in this e-mail (including any
attachments)is confidential. It must not be disclosed to any person without our
authority. If you are not the intended recipient, please delete it from your
system immediately. IBTech A.S. makes no warranty as to the accuracy or
completeness of any information contained in this message and hereby excludes
any liability of any kind for the information contained therein or for the
information transmission, reception, storage or use of such in any way
whatsoever. Any opinions expressed in this message are those of the author and
may not necessarily reflect the opinions of IBTech
A.S.
Re: Printing message history during root debug
Posted by Claus Ibsen <cl...@gmail.com>.
If you are using Camel 2.17 you can use simple language to get it, and
then log it easily
.log("${messageHistory}")
On Thu, Jun 9, 2016 at 10:55 AM, Kasim Sert (Ibtech-Software
Infrastructure) <ka...@ibtech.com.tr> wrote:
> Hi,
>
> Is it possible to print Message history (which is printed in case of errors like below) during a route debug without error conditions. I just want to learn how did I reach at that bean currently I am debugging. Is that possible ?
>
>
> Message History
> ---------------------------------------------------------------------------------------------------------------------------------------
> RouteId ProcessorId Processor Elapsed (ms)
> [route25 ] [route25 ] [direct://FT_EXPORT_FILE ] [ 0]
> [route25 ] [to109 ] [direct:pollOnDemand ] [ 0]
> [route19 ] [bean179 ] [bean[com.abc.mft.MftTransferGroup@c21c663c] ] [ 0]
> [route19 ] [choice1 ] [when[{header{header(pendingTranferExists)} == true}]choice[] ] [ 0]
> [route19 ] [bean180 ] [bean[com.abc.mft.helper.CommonHelper] ] [ 0]
>
>
> [Facebook]<http://www.facebook.com/Finansbank> [Twitter] <http://twitter.com/finansbank>
>
> [https://www.finansbank.com.tr/Disclaimer/BannerImages.aspx?date=09.06.201611:5500]<https://www.finansbank.com.tr/Disclaimer/Bannerlink.aspx?date=09.06.201611:5500>
>
>
> Bu e-posta'n?n i?erdi?i bilgiler (ekleri dahil olmak ?zere) gizlidir. Onay?m?z olmaks?z?n ???nc? ki?ilere a?iklanamaz. Bu mesaj?n g?nderilmek istendi?i ki?i de?ilseniz, l?tfen mesaj? sisteminizden derhal siliniz. IBTech A.?. bu mesaj?n i?erdi?i bilgilerin do?rulu?u veya eksiksiz oldu?u konusunda bir garanti vermemektedir. Bu nedenle bilgilerin ne ?ekilde olursa olsun i?eri?inden, iletilmesinden, al?nmas?ndan, saklanmas?ndan sorumlu de?ildir. Bu mesaj?n i?eri?i yazar?na ait olup, IBTech A.?.'nin g?r??lerini i?ermeyebilir.
>
> The information contained in this e-mail (including any attachments)is confidential. It must not be disclosed to any person without our authority. If you are not the intended recipient, please delete it from your system immediately. IBTech A.S. makes no warranty as to the accuracy or completeness of any information contained in this message and hereby excludes any liability of any kind for the information contained therein or for the information transmission, reception, storage or use of such in any way whatsoever. Any opinions expressed in this message are those of the author and may not necessarily reflect the opinions of IBTech A.S.
--
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2