You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Firas Khasawneh <Fi...@sas.com.INVALID> on 2020/08/06 16:30:44 UTC
Create ErrorHandler class
Hi all,
We need to create an Error Handler class since the available Camel Error handler classes: DefaultErrorHandler, DeadLetterChannel and TransactionErrorHandler don’t meet all our requirements.
Is it possible to create such a class?
Thanks,
Firas
RE: Create ErrorHandler class
Posted by "Shultz, Dmitry" <Dm...@kaltire.com>.
I'm using DSL for routes configurartion and CDI for injecting DeadLetterChannelBuilder into the RouteBuilder class and then registering it (errorHandler(myDeadLetterChannelBuilder);). CDI allows to use custom annotaion with parameters (redeliveryPolicy, maxRedeliveries, deadLetterUri, ...) makes the erro handling code very clean.
But, It should not matter how you configure your route and instantiate the DeadLetterChannelBuilder, here is an example of using XML https://camel.apache.org/components/latest/eips/dead-letter-channel.html
Cheers,
Dmitry
-----Original Message-----
From: Firas Khasawneh [mailto:Firas.Khasawneh@sas.com.INVALID]
Sent: Monday, August 10, 2020 11:00 AM
To: users@camel.apache.org
Subject: Re: Create ErrorHandler class
Hi Dmitry,
Can you please expand on how to customize DeadLetterChannelBuilder? We are using Xml dsl for setting up routes.
Thanks,
Firas
On 8/7/20, 6:38 PM, "Shultz, Dmitry" <Dm...@kaltire.com> wrote:
EXTERNAL
You can customize the DeadLetterChannelBuilder the way you want it and register it in your RouteBuilder.
Cheers,
Dmitry
-----Original Message-----
From: Firas Khasawneh [mailto:Firas.Khasawneh@sas.com.INVALID]
Sent: Friday, August 7, 2020 5:45 AM
To: users@camel.apache.org
Subject: Re: Create ErrorHandler class
Hi Claus,
Thanks for your response. We need to be able to add more attributes and also implement different behavior.
Regards,
Firas
On 8/7/20, 3:23 AM, "Claus Ibsen" <cl...@gmail.com> wrote:
EXTERNAL
Hi
You may be able to do, but I dont recommend it.
What is it that the out of the box cannot do?
On Thu, Aug 6, 2020 at 6:30 PM Firas Khasawneh
<Fi...@sas.com.invalid> wrote:
>
> Hi all,
>
> We need to create an Error Handler class since the available Camel Error handler classes: DefaultErrorHandler, DeadLetterChannel and TransactionErrorHandler don’t meet all our requirements.
> Is it possible to create such a class?
>
> Thanks,
> Firas
--
Claus Ibsen
-----------------
https://urldefense.com/v3/__https://nam02.safelinks.protection.outlook.com/?url=https*3A*2F*2Furldefense.com*2Fv3*2F__https*3A*2F*2Fnam02.safelinks.protection.outlook.com*2F*3Furl*3Dhttp*3A*2F*2Fdavsclaus.com*2F*26amp*3Bdata*3D02*7C01*7CFiras.Khasawneh*40sas.com*7Cccf95a9e2135461021bf08d83aa2c63e*7Cb1c14d5c362545b3a4309552373a0c2f*7C0*7C0*7C637323818077254151*26amp*3Bsdata*3DN6*2FDmH17SmJ9kn5eum2d*2B0U74GiNNJvKEjz338za6Xg*3D*26amp*3Breserved*3D0__*3BJSUlJSUlJSUlJSUlJSUl!!LdWlNaMnLCM!PLMdYZ_x4Woz5bRHckgxOcSKPEW_r8uOfJp5f_8c-px4tIwZCnGmFJJdXWUuSYSUC7ZU*24&data=02*7C01*7CFiras.Khasawneh*40sas.com*7Ca7e1445c7d8a42736c7f08d83b228dc0*7Cb1c14d5c362545b3a4309552373a0c2f*7C0*7C0*7C637324366948405224&sdata=yW*2FDvhIrto52hMd*2F*2BQQKh*2BCBqdzCbFJdNsbz77t2abM*3D&reserved=0__;JSUlJSUlJSUlJSUqKioqJSUlKioqKioqKiolJSUqKiolJSUlJSUlJSUlJSUlJSUlJSU!!LdWlNaMnLCM!MFzqDYxn_9MZlmIMrOk9WKbrmP03rA7laQIe4SMWPQfGLBequcc1YhJJE3t1YCGW6BNw$ @davsclaus
Camel in Action 2: https://urldefense.com/v3/__https://nam02.safelinks.protection.outlook.com/?url=https*3A*2F*2Furldefense.com*2Fv3*2F__https*3A*2F*2Fnam02.safelinks.protection.outlook.com*2F*3Furl*3Dhttps*3A*2F*2Fwww.manning.com*2Fibsen2*26amp*3Bdata*3D02*7C01*7CFiras.Khasawneh*40sas.com*7Cccf95a9e2135461021bf08d83aa2c63e*7Cb1c14d5c362545b3a4309552373a0c2f*7C0*7C0*7C637323818077254151*26amp*3Bsdata*3Dk4FokqmlR8Um2SJzLjdQKCsZ*2Fg00Au8p6X8X8EdepCQ*3D*26amp*3Breserved*3D0__*3BJSUlJSUlJSUlJSUlJSU!!LdWlNaMnLCM!PLMdYZ_x4Woz5bRHckgxOcSKPEW_r8uOfJp5f_8c-px4tIwZCnGmFJJdXWUuSTqnhx5z*24&data=02*7C01*7CFiras.Khasawneh*40sas.com*7Ca7e1445c7d8a42736c7f08d83b228dc0*7Cb1c14d5c362545b3a4309552373a0c2f*7C0*7C0*7C637324366948415224&sdata=SKThXsHzrv91IGydk9*2BgffCHC37OP7GojPGhnomMPII*3D&reserved=0__;JSUlJSUlJSUlJSUqKioqJSUlKioqKioqKiolJSUqKiUlJSUlJSUlJSUlJSUlJQ!!LdWlNaMnLCM!MFzqDYxn_9MZlmIMrOk9WKbrmP03rA7laQIe4SMWPQfGLBequcc1YhJJE3t1YE0mwQBh$
Re: Create ErrorHandler class
Posted by Firas Khasawneh <Fi...@sas.com.INVALID>.
Hi Dmitry,
Can you please expand on how to customize DeadLetterChannelBuilder? We are using Xml dsl for setting up routes.
Thanks,
Firas
On 8/7/20, 6:38 PM, "Shultz, Dmitry" <Dm...@kaltire.com> wrote:
EXTERNAL
You can customize the DeadLetterChannelBuilder the way you want it and register it in your RouteBuilder.
Cheers,
Dmitry
-----Original Message-----
From: Firas Khasawneh [mailto:Firas.Khasawneh@sas.com.INVALID]
Sent: Friday, August 7, 2020 5:45 AM
To: users@camel.apache.org
Subject: Re: Create ErrorHandler class
Hi Claus,
Thanks for your response. We need to be able to add more attributes and also implement different behavior.
Regards,
Firas
On 8/7/20, 3:23 AM, "Claus Ibsen" <cl...@gmail.com> wrote:
EXTERNAL
Hi
You may be able to do, but I dont recommend it.
What is it that the out of the box cannot do?
On Thu, Aug 6, 2020 at 6:30 PM Firas Khasawneh
<Fi...@sas.com.invalid> wrote:
>
> Hi all,
>
> We need to create an Error Handler class since the available Camel Error handler classes: DefaultErrorHandler, DeadLetterChannel and TransactionErrorHandler don’t meet all our requirements.
> Is it possible to create such a class?
>
> Thanks,
> Firas
--
Claus Ibsen
-----------------
https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Furldefense.com%2Fv3%2F__https%3A%2F%2Fnam02.safelinks.protection.outlook.com%2F%3Furl%3Dhttp*3A*2F*2Fdavsclaus.com*2F%26amp%3Bdata%3D02*7C01*7CFiras.Khasawneh*40sas.com*7Cccf95a9e2135461021bf08d83aa2c63e*7Cb1c14d5c362545b3a4309552373a0c2f*7C0*7C0*7C637323818077254151%26amp%3Bsdata%3DN6*2FDmH17SmJ9kn5eum2d*2B0U74GiNNJvKEjz338za6Xg*3D%26amp%3Breserved%3D0__%3BJSUlJSUlJSUlJSUlJSUl!!LdWlNaMnLCM!PLMdYZ_x4Woz5bRHckgxOcSKPEW_r8uOfJp5f_8c-px4tIwZCnGmFJJdXWUuSYSUC7ZU%24&data=02%7C01%7CFiras.Khasawneh%40sas.com%7Ca7e1445c7d8a42736c7f08d83b228dc0%7Cb1c14d5c362545b3a4309552373a0c2f%7C0%7C0%7C637324366948405224&sdata=yW%2FDvhIrto52hMd%2F%2BQQKh%2BCBqdzCbFJdNsbz77t2abM%3D&reserved=0 @davsclaus
Camel in Action 2: https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Furldefense.com%2Fv3%2F__https%3A%2F%2Fnam02.safelinks.protection.outlook.com%2F%3Furl%3Dhttps*3A*2F*2Fwww.manning.com*2Fibsen2%26amp%3Bdata%3D02*7C01*7CFiras.Khasawneh*40sas.com*7Cccf95a9e2135461021bf08d83aa2c63e*7Cb1c14d5c362545b3a4309552373a0c2f*7C0*7C0*7C637323818077254151%26amp%3Bsdata%3Dk4FokqmlR8Um2SJzLjdQKCsZ*2Fg00Au8p6X8X8EdepCQ*3D%26amp%3Breserved%3D0__%3BJSUlJSUlJSUlJSUlJSU!!LdWlNaMnLCM!PLMdYZ_x4Woz5bRHckgxOcSKPEW_r8uOfJp5f_8c-px4tIwZCnGmFJJdXWUuSTqnhx5z%24&data=02%7C01%7CFiras.Khasawneh%40sas.com%7Ca7e1445c7d8a42736c7f08d83b228dc0%7Cb1c14d5c362545b3a4309552373a0c2f%7C0%7C0%7C637324366948415224&sdata=SKThXsHzrv91IGydk9%2BgffCHC37OP7GojPGhnomMPII%3D&reserved=0
RE: Create ErrorHandler class
Posted by "Shultz, Dmitry" <Dm...@kaltire.com>.
You can customize the DeadLetterChannelBuilder the way you want it and register it in your RouteBuilder.
Cheers,
Dmitry
-----Original Message-----
From: Firas Khasawneh [mailto:Firas.Khasawneh@sas.com.INVALID]
Sent: Friday, August 7, 2020 5:45 AM
To: users@camel.apache.org
Subject: Re: Create ErrorHandler class
Hi Claus,
Thanks for your response. We need to be able to add more attributes and also implement different behavior.
Regards,
Firas
On 8/7/20, 3:23 AM, "Claus Ibsen" <cl...@gmail.com> wrote:
EXTERNAL
Hi
You may be able to do, but I dont recommend it.
What is it that the out of the box cannot do?
On Thu, Aug 6, 2020 at 6:30 PM Firas Khasawneh
<Fi...@sas.com.invalid> wrote:
>
> Hi all,
>
> We need to create an Error Handler class since the available Camel Error handler classes: DefaultErrorHandler, DeadLetterChannel and TransactionErrorHandler don’t meet all our requirements.
> Is it possible to create such a class?
>
> Thanks,
> Firas
--
Claus Ibsen
-----------------
https://urldefense.com/v3/__https://nam02.safelinks.protection.outlook.com/?url=http*3A*2F*2Fdavsclaus.com*2F&data=02*7C01*7CFiras.Khasawneh*40sas.com*7Cccf95a9e2135461021bf08d83aa2c63e*7Cb1c14d5c362545b3a4309552373a0c2f*7C0*7C0*7C637323818077254151&sdata=N6*2FDmH17SmJ9kn5eum2d*2B0U74GiNNJvKEjz338za6Xg*3D&reserved=0__;JSUlJSUlJSUlJSUlJSUl!!LdWlNaMnLCM!PLMdYZ_x4Woz5bRHckgxOcSKPEW_r8uOfJp5f_8c-px4tIwZCnGmFJJdXWUuSYSUC7ZU$ @davsclaus
Camel in Action 2: https://urldefense.com/v3/__https://nam02.safelinks.protection.outlook.com/?url=https*3A*2F*2Fwww.manning.com*2Fibsen2&data=02*7C01*7CFiras.Khasawneh*40sas.com*7Cccf95a9e2135461021bf08d83aa2c63e*7Cb1c14d5c362545b3a4309552373a0c2f*7C0*7C0*7C637323818077254151&sdata=k4FokqmlR8Um2SJzLjdQKCsZ*2Fg00Au8p6X8X8EdepCQ*3D&reserved=0__;JSUlJSUlJSUlJSUlJSU!!LdWlNaMnLCM!PLMdYZ_x4Woz5bRHckgxOcSKPEW_r8uOfJp5f_8c-px4tIwZCnGmFJJdXWUuSTqnhx5z$
Re: Create ErrorHandler class
Posted by Firas Khasawneh <Fi...@sas.com.INVALID>.
Hi Claus,
Thanks for your response. We need to be able to add more attributes and also implement different behavior.
Regards,
Firas
On 8/7/20, 3:23 AM, "Claus Ibsen" <cl...@gmail.com> wrote:
EXTERNAL
Hi
You may be able to do, but I dont recommend it.
What is it that the out of the box cannot do?
On Thu, Aug 6, 2020 at 6:30 PM Firas Khasawneh
<Fi...@sas.com.invalid> wrote:
>
> Hi all,
>
> We need to create an Error Handler class since the available Camel Error handler classes: DefaultErrorHandler, DeadLetterChannel and TransactionErrorHandler don’t meet all our requirements.
> Is it possible to create such a class?
>
> Thanks,
> Firas
--
Claus Ibsen
-----------------
https://nam02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fdavsclaus.com%2F&data=02%7C01%7CFiras.Khasawneh%40sas.com%7Cccf95a9e2135461021bf08d83aa2c63e%7Cb1c14d5c362545b3a4309552373a0c2f%7C0%7C0%7C637323818077254151&sdata=N6%2FDmH17SmJ9kn5eum2d%2B0U74GiNNJvKEjz338za6Xg%3D&reserved=0 @davsclaus
Camel in Action 2: https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.manning.com%2Fibsen2&data=02%7C01%7CFiras.Khasawneh%40sas.com%7Cccf95a9e2135461021bf08d83aa2c63e%7Cb1c14d5c362545b3a4309552373a0c2f%7C0%7C0%7C637323818077254151&sdata=k4FokqmlR8Um2SJzLjdQKCsZ%2Fg00Au8p6X8X8EdepCQ%3D&reserved=0
Re: Camel JDBC or SQL component vs SpringJDBCTemplate
Posted by Jeremy Ross <je...@gmail.com>.
The SQL component is backed by spring-jdbc, and I believe it uses
JdbcTemplate extensively under the hood. I haven't compared performance of
SQL vs JDBC components, but a further benefit of the SQL component is that
it can be used in Camel's transaction support.
On Fri, Aug 7, 2020 at 10:56 PM WEIQUAN YUAN <we...@gmail.com> wrote:
> Just wondering what is the implementation behind the camel jdbc or sql
> component, how is the performance compared to springJDBCTemplate?
>
> Thanks
> --
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Weiquan Yuan
> Located in Ottawa, Canada
>
Camel JDBC or SQL component vs SpringJDBCTemplate
Posted by WEIQUAN YUAN <we...@gmail.com>.
Just wondering what is the implementation behind the camel jdbc or sql
component, how is the performance compared to springJDBCTemplate?
Thanks
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Weiquan Yuan
Located in Ottawa, Canada
Re: Create ErrorHandler class
Posted by Claus Ibsen <cl...@gmail.com>.
Hi
You may be able to do, but I dont recommend it.
What is it that the out of the box cannot do?
On Thu, Aug 6, 2020 at 6:30 PM Firas Khasawneh
<Fi...@sas.com.invalid> wrote:
>
> Hi all,
>
> We need to create an Error Handler class since the available Camel Error handler classes: DefaultErrorHandler, DeadLetterChannel and TransactionErrorHandler don’t meet all our requirements.
> Is it possible to create such a class?
>
> Thanks,
> Firas
--
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2