Create ErrorHandler class

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Create ErrorHandler class

Firas Khasawneh
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
Reply | Threaded
Open this post in threaded view
|

Re: Create ErrorHandler class

Claus Ibsen-2
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
<[hidden email]> 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
Reply | Threaded
Open this post in threaded view
|

Re: Create ErrorHandler class

Firas Khasawneh
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" <[hidden email]> 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
    <[hidden email]> 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&amp;data=02%7C01%7CFiras.Khasawneh%40sas.com%7Cccf95a9e2135461021bf08d83aa2c63e%7Cb1c14d5c362545b3a4309552373a0c2f%7C0%7C0%7C637323818077254151&amp;sdata=N6%2FDmH17SmJ9kn5eum2d%2B0U74GiNNJvKEjz338za6Xg%3D&amp;reserved=0 @davsclaus
    Camel in Action 2: https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.manning.com%2Fibsen2&amp;data=02%7C01%7CFiras.Khasawneh%40sas.com%7Cccf95a9e2135461021bf08d83aa2c63e%7Cb1c14d5c362545b3a4309552373a0c2f%7C0%7C0%7C637323818077254151&amp;sdata=k4FokqmlR8Um2SJzLjdQKCsZ%2Fg00Au8p6X8X8EdepCQ%3D&amp;reserved=0
   

Reply | Threaded
Open this post in threaded view
|

RE: Create ErrorHandler class

dimas
You can customize the DeadLetterChannelBuilder the way you want it and register it in your RouteBuilder.

Cheers,
Dmitry

-----Original Message-----
From: Firas Khasawneh [mailto:[hidden email]]
Sent: Friday, August 7, 2020 5:45 AM
To: [hidden email]
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" <[hidden email]> 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
    <[hidden email]> 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&amp;data=02*7C01*7CFiras.Khasawneh*40sas.com*7Cccf95a9e2135461021bf08d83aa2c63e*7Cb1c14d5c362545b3a4309552373a0c2f*7C0*7C0*7C637323818077254151&amp;sdata=N6*2FDmH17SmJ9kn5eum2d*2B0U74GiNNJvKEjz338za6Xg*3D&amp;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&amp;data=02*7C01*7CFiras.Khasawneh*40sas.com*7Cccf95a9e2135461021bf08d83aa2c63e*7Cb1c14d5c362545b3a4309552373a0c2f*7C0*7C0*7C637323818077254151&amp;sdata=k4FokqmlR8Um2SJzLjdQKCsZ*2Fg00Au8p6X8X8EdepCQ*3D&amp;reserved=0__;JSUlJSUlJSUlJSUlJSU!!LdWlNaMnLCM!PLMdYZ_x4Woz5bRHckgxOcSKPEW_r8uOfJp5f_8c-px4tIwZCnGmFJJdXWUuSTqnhx5z$ 
   

Reply | Threaded
Open this post in threaded view
|

Camel JDBC or SQL component vs SpringJDBCTemplate

wyuan4
In reply to this post by Claus Ibsen-2
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
Reply | Threaded
Open this post in threaded view
|

Re: Create ErrorHandler class

Firas Khasawneh
In reply to this post by dimas
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" <[hidden email]> 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:[hidden email]]
    Sent: Friday, August 7, 2020 5:45 AM
    To: [hidden email]
    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" <[hidden email]> 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
        <[hidden email]> 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&amp;data=02%7C01%7CFiras.Khasawneh%40sas.com%7Ca7e1445c7d8a42736c7f08d83b228dc0%7Cb1c14d5c362545b3a4309552373a0c2f%7C0%7C0%7C637324366948405224&amp;sdata=yW%2FDvhIrto52hMd%2F%2BQQKh%2BCBqdzCbFJdNsbz77t2abM%3D&amp;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&amp;data=02%7C01%7CFiras.Khasawneh%40sas.com%7Ca7e1445c7d8a42736c7f08d83b228dc0%7Cb1c14d5c362545b3a4309552373a0c2f%7C0%7C0%7C637324366948415224&amp;sdata=SKThXsHzrv91IGydk9%2BgffCHC37OP7GojPGhnomMPII%3D&amp;reserved=0
   
   
   

Reply | Threaded
Open this post in threaded view
|

RE: Create ErrorHandler class

dimas
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:[hidden email]]
Sent: Monday, August 10, 2020 11:00 AM
To: [hidden email]
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" <[hidden email]> 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:[hidden email]]
    Sent: Friday, August 7, 2020 5:45 AM
    To: [hidden email]
    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" <[hidden email]> 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
        <[hidden email]> 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&amp;data=02*7C01*7CFiras.Khasawneh*40sas.com*7Ca7e1445c7d8a42736c7f08d83b228dc0*7Cb1c14d5c362545b3a4309552373a0c2f*7C0*7C0*7C637324366948405224&amp;sdata=yW*2FDvhIrto52hMd*2F*2BQQKh*2BCBqdzCbFJdNsbz77t2abM*3D&amp;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&amp;data=02*7C01*7CFiras.Khasawneh*40sas.com*7Ca7e1445c7d8a42736c7f08d83b228dc0*7Cb1c14d5c362545b3a4309552373a0c2f*7C0*7C0*7C637324366948415224&amp;sdata=SKThXsHzrv91IGydk9*2BgffCHC37OP7GojPGhnomMPII*3D&amp;reserved=0__;JSUlJSUlJSUlJSUqKioqJSUlKioqKioqKiolJSUqKiUlJSUlJSUlJSUlJSUlJQ!!LdWlNaMnLCM!MFzqDYxn_9MZlmIMrOk9WKbrmP03rA7laQIe4SMWPQfGLBequcc1YhJJE3t1YE0mwQBh$ 
   
   
   

Reply | Threaded
Open this post in threaded view
|

Re: Camel JDBC or SQL component vs SpringJDBCTemplate

Jeremy Ross
In reply to this post by wyuan4
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 <[hidden email]> 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
>