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/11 17:07:08 UTC

Access Endpoint from Exchange

Hi all,

When sending a message to a service endpoint, in case of Exception, is there a way to get the endpoint from Exchange?
I see the api call getFromEndpoint method but I am not sure that gives me the destination service endpoint?
Do you know if and how I can get the service endpoint from Exchange?

Thanks,
Firas

Re: Access Endpoint from Exchange

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Yeah you can find details as exchange properties with the last
endpoint and failure endpoint

On Tue, Aug 11, 2020 at 7:07 PM Firas Khasawneh
<Fi...@sas.com.invalid> wrote:
>
> Hi all,
>
> When sending a message to a service endpoint, in case of Exception, is there a way to get the endpoint from Exchange?
> I see the api call getFromEndpoint method but I am not sure that gives me the destination service endpoint?
> Do you know if and how I can get the service endpoint from Exchange?
>
> Thanks,
> Firas



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

Re: Netty using global ssl context parameters

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Okay can you try and test with a newer version like 3.9.0, or the next LTS 3.7.x

On Wed, Mar 31, 2021 at 6:01 PM Firas Khasawneh
<Fi...@sas.com.invalid> wrote:
>
> Hi Claus,
>
> We are using Camel 3.4.4 and we have all the *-starter jars.
>
> Thanks,
> Firas
>
> From: Claus Ibsen <cl...@gmail.com>
> Date: Wednesday, March 31, 2021 at 10:47 AM
> To: users@camel.apache.org <us...@camel.apache.org>
> Subject: Re: Netty using global ssl context parameters
> EXTERNAL
>
> Hi
>
> What Camel version, and do you use the -starter JARs as they have that
> auto configuration needed for spring boot
>
> On Wed, Mar 31, 2021 at 4:43 PM Firas Khasawneh
> <Fi...@sas.com.invalid> wrote:
> >
> > Hi all,
> >
> > We are running Camel in Spring Boot. I configured Camel SslContextParameters by setting the following properties in the application.properties file:
> > camel.ssl.config.key-managers.key-password
> > camel.ssl.config.key-managers.key-store.resource
> > camel.ssl.config.key-managers.key-store.password
> > camel.ssl.config.key-managers.key-store.type
> > camel.ssl.config.trust-managers.key-store.resource
> > camel.ssl.config.trust-managers.key-store.password
> > camel.component.netty.use-global-ssl-context-parameters=true
> >
> > and then I configure my route as below:
> >
> > <routes xmlns="https://nam02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fcamel.apache.org%2Fschema%2Fspring&amp;data=04%7C01%7CFiras.Khasawneh%40sas.com%7C585eb33d602747ea0b8108d8f453f936%7Cb1c14d5c362545b3a4309552373a0c2f%7C0%7C0%7C637527988783943119%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=sdoDvyCFwGA9UPYs9neA2IyBPcGpWuudah7%2BgZUdFYw%3D&amp;reserved=0">
> >   <route id="nettyConsumer" startupOrder="10">
> >     <from uri="netty:tcp://company.com:8444?sync=true&amp;ssl=true&amp;needClientAuth=true "/>
> >     <setBody>
> >        <simple>
> >          simple payload out
> >        </simple>
> >     </setBody>
> >     <to uri="log:Received"/>
> >   </route>
> > </routes>
> >
> > When I start the application, I noticed that camel.component.netty.use-global-ssl-context-parameters=true property is not honored. I get the following exception:
> >
> > 2021-03-29 20:21:42.896 DEBUG 2340379 --- [main] .a.c.c.n.DefaultClientInitializerFactory : keystorefile is null
> > 2021-03-29 20:21:42.897 DEBUG 2340379 --- [main] .a.c.c.n.DefaultClientInitializerFactory : truststorefile is null
> > 2021-03-29 20:21:42.897 DEBUG 2340379 --- [main] o.a.camel.component.netty.NettyProducer  : Stopping producer at address: company.com:8444
> > 2021-03-29 20:21:42.905 ERROR 2340379 --- [main] o.a.c.impl.engine.AbstractCamelContext   : Error starting CamelContext (BOSS) due to exception thrown: Failed to start route ssl-netty-producer because of null
> > org.apache.camel.FailedToStartRouteException: Failed to start route ssl-netty-producer because of null
> > …
> >
> > Does anybody know if I am missing any other property? It looks like a Camel bug but I want to confirm if anybody has faced this issue before and if there is a solution,
> >
> > Regards,
> > Firas
>
>
>
> --
> Claus Ibsen
> -----------------
> https://nam02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fdavsclaus.com%2F&amp;data=04%7C01%7CFiras.Khasawneh%40sas.com%7C585eb33d602747ea0b8108d8f453f936%7Cb1c14d5c362545b3a4309552373a0c2f%7C0%7C0%7C637527988783943119%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=LmifWvdC2z5xVold62h32wLndRjmbhQ9SGdnVa9RNRE%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=04%7C01%7CFiras.Khasawneh%40sas.com%7C585eb33d602747ea0b8108d8f453f936%7Cb1c14d5c362545b3a4309552373a0c2f%7C0%7C0%7C637527988783943119%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=6AInOj455P3L2LY8kDOOapQ%2BLGen%2BqynUCtiFIERfZk%3D&amp;reserved=0



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

Re: Netty using global ssl context parameters

Posted by Firas Khasawneh <Fi...@sas.com.INVALID>.
Hi Claus,

We are using Camel 3.4.4 and we have all the *-starter jars.

Thanks,
Firas

From: Claus Ibsen <cl...@gmail.com>
Date: Wednesday, March 31, 2021 at 10:47 AM
To: users@camel.apache.org <us...@camel.apache.org>
Subject: Re: Netty using global ssl context parameters
EXTERNAL

Hi

What Camel version, and do you use the -starter JARs as they have that
auto configuration needed for spring boot

On Wed, Mar 31, 2021 at 4:43 PM Firas Khasawneh
<Fi...@sas.com.invalid> wrote:
>
> Hi all,
>
> We are running Camel in Spring Boot. I configured Camel SslContextParameters by setting the following properties in the application.properties file:
> camel.ssl.config.key-managers.key-password
> camel.ssl.config.key-managers.key-store.resource
> camel.ssl.config.key-managers.key-store.password
> camel.ssl.config.key-managers.key-store.type
> camel.ssl.config.trust-managers.key-store.resource
> camel.ssl.config.trust-managers.key-store.password
> camel.component.netty.use-global-ssl-context-parameters=true
>
> and then I configure my route as below:
>
> <routes xmlns="https://nam02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fcamel.apache.org%2Fschema%2Fspring&amp;data=04%7C01%7CFiras.Khasawneh%40sas.com%7C585eb33d602747ea0b8108d8f453f936%7Cb1c14d5c362545b3a4309552373a0c2f%7C0%7C0%7C637527988783943119%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=sdoDvyCFwGA9UPYs9neA2IyBPcGpWuudah7%2BgZUdFYw%3D&amp;reserved=0">
>   <route id="nettyConsumer" startupOrder="10">
>     <from uri="netty:tcp://company.com:8444?sync=true&amp;ssl=true&amp;needClientAuth=true "/>
>     <setBody>
>        <simple>
>          simple payload out
>        </simple>
>     </setBody>
>     <to uri="log:Received"/>
>   </route>
> </routes>
>
> When I start the application, I noticed that camel.component.netty.use-global-ssl-context-parameters=true property is not honored. I get the following exception:
>
> 2021-03-29 20:21:42.896 DEBUG 2340379 --- [main] .a.c.c.n.DefaultClientInitializerFactory : keystorefile is null
> 2021-03-29 20:21:42.897 DEBUG 2340379 --- [main] .a.c.c.n.DefaultClientInitializerFactory : truststorefile is null
> 2021-03-29 20:21:42.897 DEBUG 2340379 --- [main] o.a.camel.component.netty.NettyProducer  : Stopping producer at address: company.com:8444
> 2021-03-29 20:21:42.905 ERROR 2340379 --- [main] o.a.c.impl.engine.AbstractCamelContext   : Error starting CamelContext (BOSS) due to exception thrown: Failed to start route ssl-netty-producer because of null
> org.apache.camel.FailedToStartRouteException: Failed to start route ssl-netty-producer because of null
> …
>
> Does anybody know if I am missing any other property? It looks like a Camel bug but I want to confirm if anybody has faced this issue before and if there is a solution,
>
> Regards,
> Firas



--
Claus Ibsen
-----------------
https://nam02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fdavsclaus.com%2F&amp;data=04%7C01%7CFiras.Khasawneh%40sas.com%7C585eb33d602747ea0b8108d8f453f936%7Cb1c14d5c362545b3a4309552373a0c2f%7C0%7C0%7C637527988783943119%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=LmifWvdC2z5xVold62h32wLndRjmbhQ9SGdnVa9RNRE%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=04%7C01%7CFiras.Khasawneh%40sas.com%7C585eb33d602747ea0b8108d8f453f936%7Cb1c14d5c362545b3a4309552373a0c2f%7C0%7C0%7C637527988783943119%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=6AInOj455P3L2LY8kDOOapQ%2BLGen%2BqynUCtiFIERfZk%3D&amp;reserved=0

Re: Netty using global ssl context parameters

Posted by Firas Khasawneh <Fi...@sas.com.INVALID>.
Upgrading to Camel 3.7.3 resolved the issue. Thanks for the help Claus!

From: Claus Ibsen <cl...@gmail.com>
Date: Wednesday, March 31, 2021 at 10:47 AM
To: users@camel.apache.org <us...@camel.apache.org>
Subject: Re: Netty using global ssl context parameters
EXTERNAL

Hi

What Camel version, and do you use the -starter JARs as they have that
auto configuration needed for spring boot

On Wed, Mar 31, 2021 at 4:43 PM Firas Khasawneh
<Fi...@sas.com.invalid> wrote:
>
> Hi all,
>
> We are running Camel in Spring Boot. I configured Camel SslContextParameters by setting the following properties in the application.properties file:
> camel.ssl.config.key-managers.key-password
> camel.ssl.config.key-managers.key-store.resource
> camel.ssl.config.key-managers.key-store.password
> camel.ssl.config.key-managers.key-store.type
> camel.ssl.config.trust-managers.key-store.resource
> camel.ssl.config.trust-managers.key-store.password
> camel.component.netty.use-global-ssl-context-parameters=true
>
> and then I configure my route as below:
>
> <routes xmlns="https://nam02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fcamel.apache.org%2Fschema%2Fspring&amp;data=04%7C01%7CFiras.Khasawneh%40sas.com%7C585eb33d602747ea0b8108d8f453f936%7Cb1c14d5c362545b3a4309552373a0c2f%7C0%7C0%7C637527988783943119%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=sdoDvyCFwGA9UPYs9neA2IyBPcGpWuudah7%2BgZUdFYw%3D&amp;reserved=0">
>   <route id="nettyConsumer" startupOrder="10">
>     <from uri="netty:tcp://company.com:8444?sync=true&amp;ssl=true&amp;needClientAuth=true "/>
>     <setBody>
>        <simple>
>          simple payload out
>        </simple>
>     </setBody>
>     <to uri="log:Received"/>
>   </route>
> </routes>
>
> When I start the application, I noticed that camel.component.netty.use-global-ssl-context-parameters=true property is not honored. I get the following exception:
>
> 2021-03-29 20:21:42.896 DEBUG 2340379 --- [main] .a.c.c.n.DefaultClientInitializerFactory : keystorefile is null
> 2021-03-29 20:21:42.897 DEBUG 2340379 --- [main] .a.c.c.n.DefaultClientInitializerFactory : truststorefile is null
> 2021-03-29 20:21:42.897 DEBUG 2340379 --- [main] o.a.camel.component.netty.NettyProducer  : Stopping producer at address: company.com:8444
> 2021-03-29 20:21:42.905 ERROR 2340379 --- [main] o.a.c.impl.engine.AbstractCamelContext   : Error starting CamelContext (BOSS) due to exception thrown: Failed to start route ssl-netty-producer because of null
> org.apache.camel.FailedToStartRouteException: Failed to start route ssl-netty-producer because of null
> …
>
> Does anybody know if I am missing any other property? It looks like a Camel bug but I want to confirm if anybody has faced this issue before and if there is a solution,
>
> Regards,
> Firas



--
Claus Ibsen
-----------------
https://nam02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fdavsclaus.com%2F&amp;data=04%7C01%7CFiras.Khasawneh%40sas.com%7C585eb33d602747ea0b8108d8f453f936%7Cb1c14d5c362545b3a4309552373a0c2f%7C0%7C0%7C637527988783943119%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=LmifWvdC2z5xVold62h32wLndRjmbhQ9SGdnVa9RNRE%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=04%7C01%7CFiras.Khasawneh%40sas.com%7C585eb33d602747ea0b8108d8f453f936%7Cb1c14d5c362545b3a4309552373a0c2f%7C0%7C0%7C637527988783943119%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=6AInOj455P3L2LY8kDOOapQ%2BLGen%2BqynUCtiFIERfZk%3D&amp;reserved=0

Re: Netty using global ssl context parameters

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

What Camel version, and do you use the -starter JARs as they have that
auto configuration needed for spring boot

On Wed, Mar 31, 2021 at 4:43 PM Firas Khasawneh
<Fi...@sas.com.invalid> wrote:
>
> Hi all,
>
> We are running Camel in Spring Boot. I configured Camel SslContextParameters by setting the following properties in the application.properties file:
> camel.ssl.config.key-managers.key-password
> camel.ssl.config.key-managers.key-store.resource
> camel.ssl.config.key-managers.key-store.password
> camel.ssl.config.key-managers.key-store.type
> camel.ssl.config.trust-managers.key-store.resource
> camel.ssl.config.trust-managers.key-store.password
> camel.component.netty.use-global-ssl-context-parameters=true
>
> and then I configure my route as below:
>
> <routes xmlns="http://camel.apache.org/schema/spring">
>   <route id="nettyConsumer" startupOrder="10">
>     <from uri="netty:tcp://company.com:8444?sync=true&amp;ssl=true&amp;needClientAuth=true "/>
>     <setBody>
>        <simple>
>          simple payload out
>        </simple>
>     </setBody>
>     <to uri="log:Received"/>
>   </route>
> </routes>
>
> When I start the application, I noticed that camel.component.netty.use-global-ssl-context-parameters=true property is not honored. I get the following exception:
>
> 2021-03-29 20:21:42.896 DEBUG 2340379 --- [main] .a.c.c.n.DefaultClientInitializerFactory : keystorefile is null
> 2021-03-29 20:21:42.897 DEBUG 2340379 --- [main] .a.c.c.n.DefaultClientInitializerFactory : truststorefile is null
> 2021-03-29 20:21:42.897 DEBUG 2340379 --- [main] o.a.camel.component.netty.NettyProducer  : Stopping producer at address: company.com:8444
> 2021-03-29 20:21:42.905 ERROR 2340379 --- [main] o.a.c.impl.engine.AbstractCamelContext   : Error starting CamelContext (BOSS) due to exception thrown: Failed to start route ssl-netty-producer because of null
> org.apache.camel.FailedToStartRouteException: Failed to start route ssl-netty-producer because of null
> …
>
> Does anybody know if I am missing any other property? It looks like a Camel bug but I want to confirm if anybody has faced this issue before and if there is a solution,
>
> Regards,
> Firas



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

Netty using global ssl context parameters

Posted by Firas Khasawneh <Fi...@sas.com.INVALID>.
Hi all,

We are running Camel in Spring Boot. I configured Camel SslContextParameters by setting the following properties in the application.properties file:
camel.ssl.config.key-managers.key-password
camel.ssl.config.key-managers.key-store.resource
camel.ssl.config.key-managers.key-store.password
camel.ssl.config.key-managers.key-store.type
camel.ssl.config.trust-managers.key-store.resource
camel.ssl.config.trust-managers.key-store.password
camel.component.netty.use-global-ssl-context-parameters=true

and then I configure my route as below:

<routes xmlns="http://camel.apache.org/schema/spring">
  <route id="nettyConsumer" startupOrder="10">
    <from uri="netty:tcp://company.com:8444?sync=true&amp;ssl=true&amp;needClientAuth=true "/>
    <setBody>
       <simple>
         simple payload out
       </simple>
    </setBody>
    <to uri="log:Received"/>
  </route>
</routes>

When I start the application, I noticed that camel.component.netty.use-global-ssl-context-parameters=true property is not honored. I get the following exception:

2021-03-29 20:21:42.896 DEBUG 2340379 --- [main] .a.c.c.n.DefaultClientInitializerFactory : keystorefile is null
2021-03-29 20:21:42.897 DEBUG 2340379 --- [main] .a.c.c.n.DefaultClientInitializerFactory : truststorefile is null
2021-03-29 20:21:42.897 DEBUG 2340379 --- [main] o.a.camel.component.netty.NettyProducer  : Stopping producer at address: company.com:8444
2021-03-29 20:21:42.905 ERROR 2340379 --- [main] o.a.c.impl.engine.AbstractCamelContext   : Error starting CamelContext (BOSS) due to exception thrown: Failed to start route ssl-netty-producer because of null
org.apache.camel.FailedToStartRouteException: Failed to start route ssl-netty-producer because of null
…

Does anybody know if I am missing any other property? It looks like a Camel bug but I want to confirm if anybody has faced this issue before and if there is a solution,

Regards,
Firas