Re: ExchangeTimedOutException

2022-10-11 Thread Stefan Kok
Hi Wilken

Thank you for clarifying.

Stefan

On Mon, 2022-10-10 at 21:55 +, Wilken Marci J wrote:
> Yes,  use setMessage() on return.  I ran into this a while back.  Not
> all message processes have an in and an out.  If the message process
> doesn't create an out by using setOut it created a new blank message
> and you loose everything from the original message.   
> 
> -Original Message-
> From: Stefan Kok  
> Sent: Monday, October 10, 2022 5:36 AM
> To: users@camel.apache.org
> Subject: Re: ExchangeTimedOutException
> 
> Think twice before clicking on links or opening attachments. This
> email came from outside our organization and might not be safe. If
> you are not expecting an attachment, contact the sender before
> opening it.
> 
> 
> 
> Thanks, Raymond
> 
> On the return, I am not using the setOut method but the setMessage as
> setOut has been deprecated.  It is my understanding that  we should
> use setMessage instead of setOut.
> 
> Stefan
> 
> On Mon, 2022-10-10 at 12:43 +0200, ski n wrote:
> >  To enhance the answer of Claus:
> > 
> > An exchange in Camel has two types:
> > 
> > 1) InOnly
> > 2) InOut
> > 
> > See: 
> > https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcame
> > l.apache.org%2Fmanual%2Fexchange-
> > pattern.htmldata=05%7C01%7CMARCI
> > .J.WILKEN%40dhsoha.state.or.us%7C8a8b0830f3514151378908daaabc12ad%7
> > C65
> > 8e63e88d39499c8f4813adc9452f4c%7C0%7C0%7C638010022016605912%7CUnkno
> > wn%
> > 7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiL
> > CJX
> > VCI6Mn0%3D%7C3000%7C%7C%7Csdata=3z8h74IALlh9ode4pzPbAphjjYCz%2
> > BQ3
> > L4zC51nuaMHs%3Dreserved=0
> > 
> > With the first type of exchange, "InOnly", the exchange is an event
> > message (also called 'fire and forget' or 'one-way)'. You will
> > never 
> > see the
> > warning/error:  "The OUT message was not received within: 6 
> > millis".
> > 
> > With the second type of exchange, "InOut", the exchange is 
> > request/reply.
> > Thus, when the reply (OUT) doesn't arrive on time it gives this
> > error.
> > 
> > It thus means:
> > 
> > "It didn't arrive within the configured timeout".
> > 
> > By default, the timeout is configured as, 2 ms (20 seconds),
> > but 
> > this can be set differently for a specific component.
> > 
> > Raymond
> > 
> > 
> > 
> > 
> > On Mon, Oct 10, 2022 at 12:33 PM Claus Ibsen
> > 
> > wrote:
> > 
> > > It says that the message did not arrive, and that a timeout was 
> > > triggered because of that.
> > > 
> > > What kind of messaging protocol do you use? JMS, http, etc?
> > > 
> > > On Mon, Oct 10, 2022 at 12:20 PM Stefan Kok 
> > > 
> > > wrote:
> > > 
> > > > Hi All
> > > > 
> > > > I am having great difficulty making sense of the below log
> > > > entry:
> > > > 
> > > > 10-10-2022 11:53:11.497 WARN  [ForkJoinPool.commonPool-worker-
> > > > 2]
> > > > com.experflow.service.OcepService.lambda$changeAgentState$3(Oce
> > > > pS
> > > > ervice
> > > > .java:115) - Exception Message:
> > > > org.apache.camel.ExchangeTimedOutException: The OUT message was
> > > > not received within: 6 millis. Exchange[8AFA941458EDDAE- 
> > > > 0002]
> > > > 
> > > > What is the meaning?
> > > > 
> > > > 1) The message arrived late but it did arrive.
> > > > 2) The message did not arrive at all.
> > > > 
> > > > Thank you in advance
> > > > 
> > > 
> > > 
> > > --
> > > Claus Ibsen
> > > -
> > > https://gcc02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fdav
> > > sclaus.com%2Fdata=05%7C01%7CMARCI.J.WILKEN%40dhsoha.state.or
> > > .us
> > > %7C8a8b0830f3514151378908daaabc12ad%7C658e63e88d39499c8f4813adc94
> > > 52f4c%7C0%7C0%7C638010022016605912%7CUnknown%7CTWFpbGZsb3d8eyJWIj
> > > oiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C30
> > > 00%7C%7C%7Csdata=WojJtU9A3egsk%2BVgSiowU8KTwFb1T43ON9vSlDcos
> > > G8%3Dreserved=0 @davsclaus Camel in Action 2:
> > > https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.manning.com%2Fibsen2data=05%7C01%7CMARCI.J.WILKEN%40dhsoha.state.or.us%7C8a8b0830f3514151378908daaabc12ad%7C658e63e88d39499c8f4813adc9452f4c%7C0%7C0%7C638010022016605912%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7Csdata=GhWgs%2BFvC8eyrN4QNQ8AiujadlBAudv2ws4Niu9nJKc%3Dreserved=0
> > > 
> 



Re: ExchangeTimedOutException

2022-10-11 Thread Stefan Kok
On Mon, 2022-10-10 at 13:27 +0200, Stefan Kok wrote:

The reason why the second call to the route failed is that my code did
not update the rerence to the second exchang's exchange asyncCallback
i.e I used the previous asyncCallback.



> Hi Claus 
> 
> Thank you for the response.
> 
> Background: 
> 
> We trying to translate between REST and Websockets (io.socket
> library)
> with a custom component in development.
> 
> 
> Calling the route:
> 
> Exchange exchange = ExchangeBuilder
>     .anExchange(producerTemplate.getCamelContext())
>     .withPattern(ExchangePattern.InOut)
>     .withBody(jsonNode)
>     .build();
>  
> CompletableFuture future =
> producerTemplate.asyncSend(EndPointUri.SEDA_START_END_POINT,
> exchange);
> 
> The route is configured as follows:
> @Bean
>     public RoutesBuilder ChangeAgentState() {
>     return new RouteBuilder() {
>     @Override
>     public void configure() throws Exception {
>     from(EndPointUri.SEDA_START_END_POINT)
>     .routeId("ChangeAgentState")
>     .process(new ChangeAgentStateProcessor())
>     .to(cloudConfigClient.getWssUrl())
>     .log(LoggingLevel.TRACE,"${body}");
>     }
>     };
> 
> ChangeAgentStateProcessor converts the exchange message object from
> JsonNode to EventDto ( We will return EventDto to the caller)
> 
> The first time the route is called the expected EventDto is received.
> The second time I call the route the object never arrives as per the
> exception below.
> 
> Stefan
> 
> 
> 
> 
> On Mon, 2022-10-10 at 12:33 +0200, Claus Ibsen wrote:
> > It says that the message did not arrive, and that a timeout was
> > triggered
> > because of that.
> > 
> > What kind of messaging protocol do you use? JMS, http, etc?
> > 
> > On Mon, Oct 10, 2022 at 12:20 PM Stefan Kok
> > 
> > wrote:
> > 
> > > Hi All
> > > 
> > > I am having great difficulty making sense of the below log entry:
> > > 
> > > 10-10-2022 11:53:11.497 WARN  [ForkJoinPool.commonPool-worker-2]
> > > com.experflow.service.OcepService.lambda$changeAgentState$3(OcepS
> > > er
> > > vice
> > > .java:115) - Exception Message:
> > > org.apache.camel.ExchangeTimedOutException: The OUT message was
> > > not
> > > received within: 6 millis. Exchange[8AFA941458EDDAE-
> > > 0002]
> > > 
> > > What is the meaning?
> > > 
> > > 1) The message arrived late but it did arrive.
> > > 2) The message did not arrive at all.
> > > 
> > > Thank you in advance
> > > 
> > 
> > 
> 



RE: ExchangeTimedOutException

2022-10-10 Thread Wilken Marci J
Yes,  use setMessage() on return.  I ran into this a while back.  Not all 
message processes have an in and an out.  If the message process doesn't create 
an out by using setOut it created a new blank message and you loose everything 
from the original message.   

-Original Message-
From: Stefan Kok  
Sent: Monday, October 10, 2022 5:36 AM
To: users@camel.apache.org
Subject: Re: ExchangeTimedOutException

Think twice before clicking on links or opening attachments. This email came 
from outside our organization and might not be safe. If you are not expecting 
an attachment, contact the sender before opening it.



Thanks, Raymond

On the return, I am not using the setOut method but the setMessage as setOut 
has been deprecated.  It is my understanding that  we should use setMessage 
instead of setOut.

Stefan

On Mon, 2022-10-10 at 12:43 +0200, ski n wrote:
>  To enhance the answer of Claus:
>
> An exchange in Camel has two types:
>
> 1) InOnly
> 2) InOut
>
> See: 
> https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcame
> l.apache.org%2Fmanual%2Fexchange-pattern.htmldata=05%7C01%7CMARCI
> .J.WILKEN%40dhsoha.state.or.us%7C8a8b0830f3514151378908daaabc12ad%7C65
> 8e63e88d39499c8f4813adc9452f4c%7C0%7C0%7C638010022016605912%7CUnknown%
> 7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJX
> VCI6Mn0%3D%7C3000%7C%7C%7Csdata=3z8h74IALlh9ode4pzPbAphjjYCz%2BQ3
> L4zC51nuaMHs%3Dreserved=0
>
> With the first type of exchange, "InOnly", the exchange is an event 
> message (also called 'fire and forget' or 'one-way)'. You will never 
> see the
> warning/error:  "The OUT message was not received within: 6 
> millis".
>
> With the second type of exchange, "InOut", the exchange is 
> request/reply.
> Thus, when the reply (OUT) doesn't arrive on time it gives this error.
>
> It thus means:
>
> "It didn't arrive within the configured timeout".
>
> By default, the timeout is configured as, 2 ms (20 seconds), but 
> this can be set differently for a specific component.
>
> Raymond
>
>
>
>
> On Mon, Oct 10, 2022 at 12:33 PM Claus Ibsen 
> wrote:
>
> > It says that the message did not arrive, and that a timeout was 
> > triggered because of that.
> >
> > What kind of messaging protocol do you use? JMS, http, etc?
> >
> > On Mon, Oct 10, 2022 at 12:20 PM Stefan Kok 
> > 
> > wrote:
> >
> > > Hi All
> > >
> > > I am having great difficulty making sense of the below log entry:
> > >
> > > 10-10-2022 11:53:11.497 WARN  [ForkJoinPool.commonPool-worker-2]
> > > com.experflow.service.OcepService.lambda$changeAgentState$3(OcepS
> > > ervice
> > > .java:115) - Exception Message:
> > > org.apache.camel.ExchangeTimedOutException: The OUT message was 
> > > not received within: 6 millis. Exchange[8AFA941458EDDAE- 
> > > 0002]
> > >
> > > What is the meaning?
> > >
> > > 1) The message arrived late but it did arrive.
> > > 2) The message did not arrive at all.
> > >
> > > Thank you in advance
> > >
> >
> >
> > --
> > Claus Ibsen
> > -
> > https://gcc02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fdav
> > sclaus.com%2Fdata=05%7C01%7CMARCI.J.WILKEN%40dhsoha.state.or.us
> > %7C8a8b0830f3514151378908daaabc12ad%7C658e63e88d39499c8f4813adc9452f4c%7C0%7C0%7C638010022016605912%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7Csdata=WojJtU9A3egsk%2BVgSiowU8KTwFb1T43ON9vSlDcosG8%3Dreserved=0
> >  @davsclaus Camel in Action 2: 
> > https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.manning.com%2Fibsen2data=05%7C01%7CMARCI.J.WILKEN%40dhsoha.state.or.us%7C8a8b0830f3514151378908daaabc12ad%7C658e63e88d39499c8f4813adc9452f4c%7C0%7C0%7C638010022016605912%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7Csdata=GhWgs%2BFvC8eyrN4QNQ8AiujadlBAudv2ws4Niu9nJKc%3Dreserved=0
> >



Re: ExchangeTimedOutException

2022-10-10 Thread ski n
When you need to set the exchange pattern explicit:

from("direct:foo")
  .setExchangePattern(ExchangePattern.InOut)
  .to("jms:queue:cheese");

I think when using an async producer template this pattern is automatically
set.

When you want to debug your route, you could set it as:


 from(EndPointUri.SEDA_START_END_POINT)
 .routeId("ChangeAgentState")
 .to("log:com.mycompany.changeagent?showAll=true=true")
 .process(new ChangeAgentStateProcessor())
 .to("log:com.mycompany.changeagent?showAll=true=true")
 .to(cloudConfigClient.getWssUrl())
 .to("log:com.mycompany.changeagent?showAll=true=true");

It's interesting (when possible) to also check the log on the server side.

Raymond




On Mon, Oct 10, 2022 at 2:36 PM Stefan Kok 
wrote:

> Thanks, Raymond
>
> On the return, I am not using the setOut method but the setMessage as
> setOut has been deprecated.  It is my understanding that  we should use
> setMessage instead of setOut.
>
> Stefan
>
> On Mon, 2022-10-10 at 12:43 +0200, ski n wrote:
> >  To enhance the answer of Claus:
> >
> > An exchange in Camel has two types:
> >
> > 1) InOnly
> > 2) InOut
> >
> > See: https://camel.apache.org/manual/exchange-pattern.html
> >
> > With the first type of exchange, "InOnly", the exchange is an event
> > message
> > (also called 'fire and forget' or 'one-way)'. You will never see the
> > warning/error:  "The OUT message was not
> > received within: 6 millis".
> >
> > With the second type of exchange, "InOut", the exchange is
> > request/reply.
> > Thus, when the reply (OUT) doesn't arrive on time it gives this
> > error.
> >
> > It thus means:
> >
> > "It didn't arrive within the configured timeout".
> >
> > By default, the timeout is configured as, 2 ms (20 seconds), but
> > this
> > can be set differently for a specific component.
> >
> > Raymond
> >
> >
> >
> >
> > On Mon, Oct 10, 2022 at 12:33 PM Claus Ibsen 
> > wrote:
> >
> > > It says that the message did not arrive, and that a timeout was
> > > triggered
> > > because of that.
> > >
> > > What kind of messaging protocol do you use? JMS, http, etc?
> > >
> > > On Mon, Oct 10, 2022 at 12:20 PM Stefan Kok
> > > 
> > > wrote:
> > >
> > > > Hi All
> > > >
> > > > I am having great difficulty making sense of the below log entry:
> > > >
> > > > 10-10-2022 11:53:11.497 WARN  [ForkJoinPool.commonPool-worker-2]
> > > > com.experflow.service.OcepService.lambda$changeAgentState$3(OcepS
> > > > ervice
> > > > .java:115) - Exception Message:
> > > > org.apache.camel.ExchangeTimedOutException: The OUT message was
> > > > not
> > > > received within: 6 millis. Exchange[8AFA941458EDDAE-
> > > > 0002]
> > > >
> > > > What is the meaning?
> > > >
> > > > 1) The message arrived late but it did arrive.
> > > > 2) The message did not arrive at all.
> > > >
> > > > Thank you in advance
> > > >
> > >
> > >
> > > --
> > > Claus Ibsen
> > > -
> > > http://davsclaus.com @davsclaus
> > > Camel in Action 2: https://www.manning.com/ibsen2
> > >
>
>


Re: ExchangeTimedOutException

2022-10-10 Thread Stefan Kok
Thanks, Raymond

On the return, I am not using the setOut method but the setMessage as
setOut has been deprecated.  It is my understanding that  we should use
setMessage instead of setOut.

Stefan

On Mon, 2022-10-10 at 12:43 +0200, ski n wrote:
>  To enhance the answer of Claus:
> 
> An exchange in Camel has two types:
> 
> 1) InOnly
> 2) InOut
> 
> See: https://camel.apache.org/manual/exchange-pattern.html
> 
> With the first type of exchange, "InOnly", the exchange is an event
> message
> (also called 'fire and forget' or 'one-way)'. You will never see the
> warning/error:  "The OUT message was not
> received within: 6 millis".
> 
> With the second type of exchange, "InOut", the exchange is
> request/reply.
> Thus, when the reply (OUT) doesn't arrive on time it gives this
> error.
> 
> It thus means:
> 
> "It didn't arrive within the configured timeout".
> 
> By default, the timeout is configured as, 2 ms (20 seconds), but
> this
> can be set differently for a specific component.
> 
> Raymond
> 
> 
> 
> 
> On Mon, Oct 10, 2022 at 12:33 PM Claus Ibsen 
> wrote:
> 
> > It says that the message did not arrive, and that a timeout was
> > triggered
> > because of that.
> > 
> > What kind of messaging protocol do you use? JMS, http, etc?
> > 
> > On Mon, Oct 10, 2022 at 12:20 PM Stefan Kok
> > 
> > wrote:
> > 
> > > Hi All
> > > 
> > > I am having great difficulty making sense of the below log entry:
> > > 
> > > 10-10-2022 11:53:11.497 WARN  [ForkJoinPool.commonPool-worker-2]
> > > com.experflow.service.OcepService.lambda$changeAgentState$3(OcepS
> > > ervice
> > > .java:115) - Exception Message:
> > > org.apache.camel.ExchangeTimedOutException: The OUT message was
> > > not
> > > received within: 6 millis. Exchange[8AFA941458EDDAE-
> > > 0002]
> > > 
> > > What is the meaning?
> > > 
> > > 1) The message arrived late but it did arrive.
> > > 2) The message did not arrive at all.
> > > 
> > > Thank you in advance
> > > 
> > 
> > 
> > --
> > Claus Ibsen
> > -
> > http://davsclaus.com @davsclaus
> > Camel in Action 2: https://www.manning.com/ibsen2
> > 



Re: ExchangeTimedOutException

2022-10-10 Thread Stefan Kok
Hi Claus 

Thank you for the response.

Background: 

We trying to translate between REST and Websockets (io.socket library)
with a custom component in development.


Calling the route:

Exchange exchange = ExchangeBuilder
.anExchange(producerTemplate.getCamelContext())
.withPattern(ExchangePattern.InOut)
.withBody(jsonNode)
.build();
 
CompletableFuture future =
producerTemplate.asyncSend(EndPointUri.SEDA_START_END_POINT, exchange);

The route is configured as follows:
@Bean
public RoutesBuilder ChangeAgentState() {
return new RouteBuilder() {
@Override
public void configure() throws Exception {
from(EndPointUri.SEDA_START_END_POINT)
.routeId("ChangeAgentState")
.process(new ChangeAgentStateProcessor())
.to(cloudConfigClient.getWssUrl())
.log(LoggingLevel.TRACE,"${body}");
}
};

ChangeAgentStateProcessor converts the exchange message object from
JsonNode to EventDto ( We will return EventDto to the caller)

The first time the route is called the expected EventDto is received.
The second time I call the route the object never arrives as per the
exception below.

Stefan




On Mon, 2022-10-10 at 12:33 +0200, Claus Ibsen wrote:
> It says that the message did not arrive, and that a timeout was
> triggered
> because of that.
> 
> What kind of messaging protocol do you use? JMS, http, etc?
> 
> On Mon, Oct 10, 2022 at 12:20 PM Stefan Kok
> 
> wrote:
> 
> > Hi All
> > 
> > I am having great difficulty making sense of the below log entry:
> > 
> > 10-10-2022 11:53:11.497 WARN  [ForkJoinPool.commonPool-worker-2]
> > com.experflow.service.OcepService.lambda$changeAgentState$3(OcepSer
> > vice
> > .java:115) - Exception Message:
> > org.apache.camel.ExchangeTimedOutException: The OUT message was not
> > received within: 6 millis. Exchange[8AFA941458EDDAE-
> > 0002]
> > 
> > What is the meaning?
> > 
> > 1) The message arrived late but it did arrive.
> > 2) The message did not arrive at all.
> > 
> > Thank you in advance
> > 
> 
> 



Re: ExchangeTimedOutException

2022-10-10 Thread ski n
 To enhance the answer of Claus:

An exchange in Camel has two types:

1) InOnly
2) InOut

See: https://camel.apache.org/manual/exchange-pattern.html

With the first type of exchange, "InOnly", the exchange is an event message
(also called 'fire and forget' or 'one-way)'. You will never see the
warning/error:  "The OUT message was not
received within: 6 millis".

With the second type of exchange, "InOut", the exchange is request/reply.
Thus, when the reply (OUT) doesn't arrive on time it gives this error.

It thus means:

"It didn't arrive within the configured timeout".

By default, the timeout is configured as, 2 ms (20 seconds), but this
can be set differently for a specific component.

Raymond




On Mon, Oct 10, 2022 at 12:33 PM Claus Ibsen  wrote:

> It says that the message did not arrive, and that a timeout was triggered
> because of that.
>
> What kind of messaging protocol do you use? JMS, http, etc?
>
> On Mon, Oct 10, 2022 at 12:20 PM Stefan Kok 
> wrote:
>
> > Hi All
> >
> > I am having great difficulty making sense of the below log entry:
> >
> > 10-10-2022 11:53:11.497 WARN  [ForkJoinPool.commonPool-worker-2]
> > com.experflow.service.OcepService.lambda$changeAgentState$3(OcepService
> > .java:115) - Exception Message:
> > org.apache.camel.ExchangeTimedOutException: The OUT message was not
> > received within: 6 millis. Exchange[8AFA941458EDDAE-
> > 0002]
> >
> > What is the meaning?
> >
> > 1) The message arrived late but it did arrive.
> > 2) The message did not arrive at all.
> >
> > Thank you in advance
> >
>
>
> --
> Claus Ibsen
> -
> http://davsclaus.com @davsclaus
> Camel in Action 2: https://www.manning.com/ibsen2
>


Re: ExchangeTimedOutException

2022-10-10 Thread Claus Ibsen
It says that the message did not arrive, and that a timeout was triggered
because of that.

What kind of messaging protocol do you use? JMS, http, etc?

On Mon, Oct 10, 2022 at 12:20 PM Stefan Kok 
wrote:

> Hi All
>
> I am having great difficulty making sense of the below log entry:
>
> 10-10-2022 11:53:11.497 WARN  [ForkJoinPool.commonPool-worker-2]
> com.experflow.service.OcepService.lambda$changeAgentState$3(OcepService
> .java:115) - Exception Message:
> org.apache.camel.ExchangeTimedOutException: The OUT message was not
> received within: 6 millis. Exchange[8AFA941458EDDAE-
> 0002]
>
> What is the meaning?
>
> 1) The message arrived late but it did arrive.
> 2) The message did not arrive at all.
>
> Thank you in advance
>


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


Re: ExchangeTimedOutException

2017-03-22 Thread Ryan T
Any other advice out there as to the problem I am trying solve?



--
View this message in context: 
http://camel.465427.n5.nabble.com/ExchangeTimedOutException-tp5795836p5795893.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: ExchangeTimedOutException

2017-03-21 Thread catequil
So what I discovered is this message history is the history starting from the
onException.  Which does not help me.  I need the history from the original
route before the exception occurred or maybe the whole route history to help
me discover where this timeout is occurring.  Or maybe we could record as
part of the ExchangeTimeOutException, "where was I when this time out
occurred?"  Camel has got to be catching it.  Or optionally the message
history could be stuck in ExchangeTimeOutException right when the original
route timed out.  Could we do that?



--
View this message in context: 
http://camel.465427.n5.nabble.com/ExchangeTimedOutException-tp5795836p5795846.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: ExchangeTimedOutException

2017-03-21 Thread catequil
I was hoping the messageHistory might have enough information in it to give
me an idea of where to look.
Added the following code to my TimeOutErrorProcessor


When I finally got the exception this is what it printed out:



Is there any way to get a more descriptive Node identifier rather than to,
log, or process with a number.?



--
View this message in context: 
http://camel.465427.n5.nabble.com/ExchangeTimedOutException-tp5795836p5795844.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: ExchangeTimedOutException

2017-03-21 Thread catequil
Those pieces of information were too general. It reported
"seda:processItemsJob" as the endpoint, but there is a lot of segments in
that area.  Any other suggestions?  The other problem I am having is because
of the parallel processing the log messages are getting all tangled
together.  It would be nice if I could some how tie them together with a
thread/seda unique id of sorts.  Unfortunately I cannot turn off the
parallel processing as the only place I can reproduce the timeout error is
in our prod environment and if I turned it off the job would take all day
and it would threaten colliding with the next days job.  Any ideas on  an ID
that I could use?  I guess I could throw in my own ID in the
OnStartProcessor, but I have yet to figure out a way to make a unique id
that is not too long as the logging is already pretty verbose.



--
View this message in context: 
http://camel.465427.n5.nabble.com/ExchangeTimedOutException-tp5795836p5795842.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: ExchangeTimedOutException

2017-03-21 Thread souciance
You could try to use the exchange property ${property.CamelFailureEndpoint}
and ${property.CamelFailureRouteId} to determine which route and endpoint
failed.

On Tue, Mar 21, 2017 at 4:40 PM, catequil [via Camel] <
ml-node+s465427n5795836...@n5.nabble.com> wrote:

> I have a route similar to the following:
>
> from("direct:myFrom")
> .onException(ExchangeTimedOutException.class)
> .handled(true)
> .log(LoggingLevel.ERROR, "TimeOut Exception for Batch Job")
> .process(new TimeOutErrorProcessor())
> .end()
>
> .onCompletion()
> .process(new JobOnCompletionProcessor()) //setup job.end.dateTime and 
> job.duration.minutes
> .log("End ${exchangeProperty[jobName]} - 
> ${exchangeProperty[job.end.dateTime]}")
> .log("End Total time: ${exchangeProperty[job.duration.minutes]} minutes.")
> .end()
>
> .process(new JobOnStartProcessor()) //setup job.start.dateTime
> .log("Begin ${exchangeProperty[jobName]} - 
> ${exchangeProperty[job.start.dateTime]}")
> .bean(iJobService, "fetchItems")
> .split().method("jobSplitter").parallelProcessing(true)
> .to("seda:processItemsJob");
>
> from("seda:processItemsJob?concurrentConsumers=10")
> .process(new ItemsPreProcessor(env))
> .bean(iAuditService, "auditExternalRequestCall")
> .to(IEndPoints.URI_REST_ITEM_ENDPOINT)
> .unmarshal().json(JsonLibrary.Jackson, ItemResponse.class)
> .bean(iAuditService, "auditExternalResponseCall")
> .process(new ItemPostProcessor())
> .bean(iDAOService, "saveItem");
>
>
>
> Everything once in a while I get the ExchangeTimedOutException, but I do
> not know from which route segment the ExchangeTimedOutException is
> happening.  Does anyone know how to determine where the timeout is actually
> occurring?
>
> --
> If you reply to this email, your message will be added to the discussion
> below:
> http://camel.465427.n5.nabble.com/ExchangeTimedOutException-tp5795836.html
> To start a new topic under Camel - Users, email
> ml-node+s465427n465428...@n5.nabble.com
> To unsubscribe from Camel - Users, click here
> 
> .
> NAML
> 
>




--
View this message in context: 
http://camel.465427.n5.nabble.com/ExchangeTimedOutException-tp5795836p5795837.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: ExchangeTimedOutException when using vm/seda with multipleConsumers=true

2012-05-25 Thread Michael Süess

Hi


i have analyzed the problem a little bit and i think the problem is not 
the InOut pattern, but the multipleConsumers=true flag;


if i run the same sample without the
setExchangePattern pattern=InOut/
everything seems to be fine, but when i look in the in (data/spike/in) 
folder there are still *.camelLock files for each consumed file




On 23.05.2012 20:46, Claus Ibsen wrote:

Hi

Thanks. I have reproduced the issue and logged a JIRA
https://issues.apache.org/jira/browse/CAMEL-5303

On Mon, May 21, 2012 at 7:38 AM, Michael Süess
michael.sue...@basis06.ch  wrote:

Hi


Camel 2.8.4

Stacktrace:

Starting Camel. Use ctrl + c to terminate the JVM.

[  main] MainSupportINFO Apache
Camel 2.8.4 starting
[  main] CamelNamespaceHandler  INFO OSGi
environment not detected.
[  main] SpringCamelContext INFO Apache
Camel 2.8.4 (CamelContext: camel-1) is starting
[  main] SpringCamelContext INFO JMX
enabled. Using ManagedManagementStrategy.
[  main] AnnotationTypeConverterLoader  INFO Found 3
packages with 15 @Converter classes to load
[  main] DefaultTypeConverter   INFO Loaded
169 core type converters (total 169 type converters)
[  main] AnnotationTypeConverterLoader  INFO Loaded
1 @Converter classes
[  main] DefaultTypeConverter   INFO Loaded
additional 1 type converters (total 170 type converters) in 0.004 seconds
[  main] FileEndpoint   INFO
Endpoint is configured with noop=true so forcing endpoint to be idempotent
as well
[  main] FileEndpoint   INFO Using
default memory based idempotent repository with cache max size: 1000
[  main] rFileExclusiveReadLockStrategy WARN
Deleting orphaned lock file: data\spike\in\foo.txt.camelLock
[  main] SpringCamelContext INFO Route:
subject started and consuming from: Endpoint[file://data/spike/in?noop=true]
[  main] SpringCamelContext INFO Route:
subjectListener1 started and consuming from:
Endpoint[vm://subjectStarted?multipleConsumers=true]
[  main] SpringCamelContext INFO Route:
subjectListener2 started and consuming from:
Endpoint[vm://subjectStarted?multipleConsumers=true]
[  main] SpringCamelContext INFO Total 3
routes, of which 3 is started.
[  main] SpringCamelContext INFO Apache
Camel 2.8.4 (CamelContext: camel-1) started in 0.572 seconds
[read #0 - file://data/spike/in] subjectINFO
starting file 'foo.txt' ...
[hread #4 - vm://subjectStarted] subjectListener2   INFO
  starting file 'foo.txt' ...
[hread #3 - vm://subjectStarted] subjectListener1   INFO
  starting file 'foo.txt' ...
[hread #4 - vm://subjectStarted] subjectListener2   INFO  file
'foo.txt' done
[hread #3 - vm://subjectStarted] subjectListener1   INFO  file
'foo.txt' done
[read #0 - file://data/spike/in] DefaultErrorHandlerERROR Failed
delivery for exchangeId: ID-nb19-50158-1337578515058-0-1. Exhausted after
delivery attempt: 1 caught: org.apache.camel.ExchangeTimedOutException: The
OUT message was not received within: 3 millis. Exchange[foo.txt]
org.apache.camel.ExchangeTimedOutException: The OUT message was not received
within: 3 millis. Exchange[foo.txt]
at
org.apache.camel.component.seda.SedaProducer.process(SedaProducer.java:129)[camel-core-2.8.4.jar:2.8.4]
at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:78)[camel-core-2.8.4.jar:2.8.4]
at
org.apache.camel.processor.SendProcessor$2.doInAsyncProducer(SendProcessor.java:114)[camel-core-2.8.4.jar:2.8.4]
at
org.apache.camel.impl.ProducerCache.doInAsyncProducer(ProducerCache.java:284)[camel-core-2.8.4.jar:2.8.4]
at
org.apache.camel.processor.SendProcessor.process(SendProcessor.java:109)[camel-core-2.8.4.jar:2.8.4]
at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:78)[camel-core-2.8.4.jar:2.8.4]
at
org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)[camel-core-2.8.4.jar:2.8.4]
at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)[camel-core-2.8.4.jar:2.8.4]
at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:69)[camel-core-2.8.4.jar:2.8.4]
at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:78)[camel-core-2.8.4.jar:2.8.4]
at

Re: ExchangeTimedOutException when using vm/seda with multipleConsumers=true

2012-05-23 Thread Claus Ibsen
Hi

Thanks. I have reproduced the issue and logged a JIRA
https://issues.apache.org/jira/browse/CAMEL-5303

On Mon, May 21, 2012 at 7:38 AM, Michael Süess
michael.sue...@basis06.ch wrote:
 Hi


 Camel 2.8.4

 Stacktrace:

 Starting Camel. Use ctrl + c to terminate the JVM.

 [                          main] MainSupport                    INFO Apache
 Camel 2.8.4 starting
 [                          main] CamelNamespaceHandler          INFO OSGi
 environment not detected.
 [                          main] SpringCamelContext             INFO Apache
 Camel 2.8.4 (CamelContext: camel-1) is starting
 [                          main] SpringCamelContext             INFO JMX
 enabled. Using ManagedManagementStrategy.
 [                          main] AnnotationTypeConverterLoader  INFO Found 3
 packages with 15 @Converter classes to load
 [                          main] DefaultTypeConverter           INFO Loaded
 169 core type converters (total 169 type converters)
 [                          main] AnnotationTypeConverterLoader  INFO Loaded
 1 @Converter classes
 [                          main] DefaultTypeConverter           INFO Loaded
 additional 1 type converters (total 170 type converters) in 0.004 seconds
 [                          main] FileEndpoint                   INFO
 Endpoint is configured with noop=true so forcing endpoint to be idempotent
 as well
 [                          main] FileEndpoint                   INFO Using
 default memory based idempotent repository with cache max size: 1000
 [                          main] rFileExclusiveReadLockStrategy WARN
 Deleting orphaned lock file: data\spike\in\foo.txt.camelLock
 [                          main] SpringCamelContext             INFO Route:
 subject started and consuming from: Endpoint[file://data/spike/in?noop=true]
 [                          main] SpringCamelContext             INFO Route:
 subjectListener1 started and consuming from:
 Endpoint[vm://subjectStarted?multipleConsumers=true]
 [                          main] SpringCamelContext             INFO Route:
 subjectListener2 started and consuming from:
 Endpoint[vm://subjectStarted?multipleConsumers=true]
 [                          main] SpringCamelContext             INFO Total 3
 routes, of which 3 is started.
 [                          main] SpringCamelContext             INFO Apache
 Camel 2.8.4 (CamelContext: camel-1) started in 0.572 seconds
 [read #0 - file://data/spike/in] subject                        INFO
 starting file 'foo.txt' ...
 [hread #4 - vm://subjectStarted] subjectListener2               INFO
  starting file 'foo.txt' ...
 [hread #3 - vm://subjectStarted] subjectListener1               INFO
  starting file 'foo.txt' ...
 [hread #4 - vm://subjectStarted] subjectListener2               INFO  file
 'foo.txt' done
 [hread #3 - vm://subjectStarted] subjectListener1               INFO  file
 'foo.txt' done
 [read #0 - file://data/spike/in] DefaultErrorHandler            ERROR Failed
 delivery for exchangeId: ID-nb19-50158-1337578515058-0-1. Exhausted after
 delivery attempt: 1 caught: org.apache.camel.ExchangeTimedOutException: The
 OUT message was not received within: 3 millis. Exchange[foo.txt]
 org.apache.camel.ExchangeTimedOutException: The OUT message was not received
 within: 3 millis. Exchange[foo.txt]
        at
 org.apache.camel.component.seda.SedaProducer.process(SedaProducer.java:129)[camel-core-2.8.4.jar:2.8.4]
        at
 org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:78)[camel-core-2.8.4.jar:2.8.4]
        at
 org.apache.camel.processor.SendProcessor$2.doInAsyncProducer(SendProcessor.java:114)[camel-core-2.8.4.jar:2.8.4]
        at
 org.apache.camel.impl.ProducerCache.doInAsyncProducer(ProducerCache.java:284)[camel-core-2.8.4.jar:2.8.4]
        at
 org.apache.camel.processor.SendProcessor.process(SendProcessor.java:109)[camel-core-2.8.4.jar:2.8.4]
        at
 org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:78)[camel-core-2.8.4.jar:2.8.4]
        at
 org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)[camel-core-2.8.4.jar:2.8.4]
        at
 org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)[camel-core-2.8.4.jar:2.8.4]
        at
 org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:69)[camel-core-2.8.4.jar:2.8.4]
        at
 org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:78)[camel-core-2.8.4.jar:2.8.4]
        at
 org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)[camel-core-2.8.4.jar:2.8.4]
        at
 org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)[camel-core-2.8.4.jar:2.8.4]
        at
 org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:90)[camel-core-2.8.4.jar:2.8.4]
        at
 

Re: ExchangeTimedOutException when using vm/seda with multipleConsumers=true

2012-05-20 Thread Michael Süess

Hi


Camel 2.8.4

Stacktrace:

Starting Camel. Use ctrl + c to terminate the JVM.

[  main] MainSupportINFO 
Apache Camel 2.8.4 starting
[  main] CamelNamespaceHandler  INFO 
OSGi environment not detected.
[  main] SpringCamelContext INFO 
Apache Camel 2.8.4 (CamelContext: camel-1) is starting
[  main] SpringCamelContext INFO 
JMX enabled. Using ManagedManagementStrategy.
[  main] AnnotationTypeConverterLoader  INFO 
Found 3 packages with 15 @Converter classes to load
[  main] DefaultTypeConverter   INFO 
Loaded 169 core type converters (total 169 type converters)
[  main] AnnotationTypeConverterLoader  INFO 
Loaded 1 @Converter classes
[  main] DefaultTypeConverter   INFO 
Loaded additional 1 type converters (total 170 type converters) in 0.004 
seconds
[  main] FileEndpoint   INFO 
Endpoint is configured with noop=true so forcing endpoint to be 
idempotent as well
[  main] FileEndpoint   INFO 
Using default memory based idempotent repository with cache max size: 1000
[  main] rFileExclusiveReadLockStrategy WARN 
Deleting orphaned lock file: data\spike\in\foo.txt.camelLock
[  main] SpringCamelContext INFO 
Route: subject started and consuming from: 
Endpoint[file://data/spike/in?noop=true]
[  main] SpringCamelContext INFO 
Route: subjectListener1 started and consuming from: 
Endpoint[vm://subjectStarted?multipleConsumers=true]
[  main] SpringCamelContext INFO 
Route: subjectListener2 started and consuming from: 
Endpoint[vm://subjectStarted?multipleConsumers=true]
[  main] SpringCamelContext INFO 
Total 3 routes, of which 3 is started.
[  main] SpringCamelContext INFO 
Apache Camel 2.8.4 (CamelContext: camel-1) started in 0.572 seconds
[read #0 - file://data/spike/in] subjectINFO 
starting file 'foo.txt' ...
[hread #4 - vm://subjectStarted] subjectListener2   INFO 
 starting file 'foo.txt' ...
[hread #3 - vm://subjectStarted] subjectListener1   INFO 
 starting file 'foo.txt' ...
[hread #4 - vm://subjectStarted] subjectListener2   INFO 
 file 'foo.txt' done
[hread #3 - vm://subjectStarted] subjectListener1   INFO 
 file 'foo.txt' done
[read #0 - file://data/spike/in] DefaultErrorHandlerERROR 
Failed delivery for exchangeId: ID-nb19-50158-1337578515058-0-1. 
Exhausted after delivery attempt: 1 caught: 
org.apache.camel.ExchangeTimedOutException: The OUT message was not 
received within: 3 millis. Exchange[foo.txt]
org.apache.camel.ExchangeTimedOutException: The OUT message was not 
received within: 3 millis. Exchange[foo.txt]
	at 
org.apache.camel.component.seda.SedaProducer.process(SedaProducer.java:129)[camel-core-2.8.4.jar:2.8.4]
	at 
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:78)[camel-core-2.8.4.jar:2.8.4]
	at 
org.apache.camel.processor.SendProcessor$2.doInAsyncProducer(SendProcessor.java:114)[camel-core-2.8.4.jar:2.8.4]
	at 
org.apache.camel.impl.ProducerCache.doInAsyncProducer(ProducerCache.java:284)[camel-core-2.8.4.jar:2.8.4]
	at 
org.apache.camel.processor.SendProcessor.process(SendProcessor.java:109)[camel-core-2.8.4.jar:2.8.4]
	at 
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:78)[camel-core-2.8.4.jar:2.8.4]
	at 
org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)[camel-core-2.8.4.jar:2.8.4]
	at 
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)[camel-core-2.8.4.jar:2.8.4]
	at 
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:69)[camel-core-2.8.4.jar:2.8.4]
	at 
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:78)[camel-core-2.8.4.jar:2.8.4]
	at 
org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)[camel-core-2.8.4.jar:2.8.4]
	at 
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)[camel-core-2.8.4.jar:2.8.4]
	at 
org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:90)[camel-core-2.8.4.jar:2.8.4]
	at 
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:78)[camel-core-2.8.4.jar:2.8.4]
	at 
org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:318)[camel-core-2.8.4.jar:2.8.4]
	at 

Re: ExchangeTimedOutException when using vm/seda with multipleConsumers=true

2012-05-19 Thread Claus Ibsen
Hi

Post the stacktrace, and what Camel version you are using.



On Wed, May 16, 2012 at 5:35 PM, Michael Süess
michael.sue...@basis06.ch wrote:
 I use vm (or seda) with ?multipleConsumers=true to implement a request-reply
 observer pattern:


 ?xml version=1.0 encoding=UTF-8?
 beans xmlns=http://www.springframework.org/schema/beans;
       xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
       xmlns:camel=http://camel.apache.org/schema/spring;
       xsi:schemaLocation=
       http://www.springframework.org/schema/beans
 http://www.springframework.org/schema/beans/spring-beans.xsd
       http://camel.apache.org/schema/spring
 http://camel.apache.org/schema/spring/camel-spring.xsd;
    camelContext xmlns=http://camel.apache.org/schema/spring;
        route id=subject
            from uri=file:data/spike/in?noop=true/
            log message=starting file '${header.CamelFileName}' .../
            to uri=vm:subjectStarted pattern=InOut/
            log message=file '${header.CamelFileName}' done/
        /route

        route id=subjectListener1
            from uri=vm:subjectStarted?multipleConsumers=true/
            log message=   starting file '${header.CamelFileName}' .../
            log message=   file '${header.CamelFileName}' done/
        /route

        route id=subjectListener2
            from uri=vm:subjectStarted?multipleConsumers=true/
            log message=   starting file '${header.CamelFileName}' .../
            log message=   file '${header.CamelFileName}' done/
        /route
    /camelContext
 /beans

 when running this sample i always got an ExchangeTimedOutException although
 all listeners have finished before the timeout.

 Any ideas?



-- 
Claus Ibsen
-
CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com
FuseSource
Email: cib...@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/


Re: ExchangeTimedOutException when using vm/seda with multipleConsumers=true

2012-05-16 Thread Christian Müller
Could you set multipl eConsumers=true also on the producer (to(vm:...))
side.

Best,
Christian

Sent from a mobile device
Am 16.05.2012 17:37 schrieb Michael Süess michael.sue...@basis06.ch:

 I use vm (or seda) with ?multipleConsumers=true to implement a
 request-reply observer pattern:


 ?xml version=1.0 encoding=UTF-8?
 beans 
 xmlns=http://www.**springframework.org/schema/**beanshttp://www.springframework.org/schema/beans
 
   
 xmlns:xsi=http://www.w3.org/**2001/XMLSchema-instancehttp://www.w3.org/2001/XMLSchema-instance
 
   
 xmlns:camel=http://camel.**apache.org/schema/springhttp://camel.apache.org/schema/spring
 
   xsi:schemaLocation=
   
 http://www.springframework.**org/schema/beanshttp://www.springframework.org/schema/beans
 http://www.springframework.**org/schema/beans/spring-beans.**xsdhttp://www.springframework.org/schema/beans/spring-beans.xsd
   
 http://camel.apache.org/**schema/springhttp://camel.apache.org/schema/spring
 http://camel.apache.org/**schema/spring/camel-spring.xsdhttp://camel.apache.org/schema/spring/camel-spring.xsd
 **
camelContext 
 xmlns=http://camel.apache.**org/schema/springhttp://camel.apache.org/schema/spring
 
route id=subject
from uri=file:data/spike/in?noop=**true/
log message=starting file '${header.CamelFileName}' .../
to uri=vm:subjectStarted pattern=InOut/
log message=file '${header.CamelFileName}' done/
/route

route id=subjectListener1
from uri=vm:subjectStarted?**multipleConsumers=true/
log message=   starting file '${header.CamelFileName}' .../
log message=   file '${header.CamelFileName}' done/
/route

route id=subjectListener2
from uri=vm:subjectStarted?**multipleConsumers=true/
log message=   starting file '${header.CamelFileName}' .../
log message=   file '${header.CamelFileName}' done/
/route
/camelContext
 /beans

 when running this sample i always got an ExchangeTimedOutException
 although all listeners have finished before the timeout.

 Any ideas?



Re: ExchangeTimedOutException not properly constructed by Camel 2.7.1 exposing exchange data

2011-11-07 Thread Claus Ibsen
Hi

I have created a ticket to avoid printing the jms message details
https://issues.apache.org/jira/browse/CAMEL-4642


On Mon, Nov 7, 2011 at 5:10 PM, Pointless pointless2...@yahoo.com wrote:
 Hello,

 We have an issue with Camel JMS component when after receiving a timeout
 (org.apache.camel.ExchangeTimedOutException) the exception's getMessage()
 always contains the whole Exchange.toString() method's content, which means
 it always exposes all sensitive headers that were set before sending the
 message to the queue. Also,  the exception's stacktrace also has
 Exchange.toString() content and exposes those headers.

 How can we solve this? Is there a fix planned for Camel? There should be
 some boolean property which would specify that the exchange content not to
 be included when constructing exceptions.

 Constructor in CamelExchangeException.java uses
 super(ExchangeHelper.createExceptionMessage(message, exchange, null)); where
 the exception message is produced.

 ReplyManagerSupport.java:
 if (timeout) {
                // no response, so lets set a timed out exception
                exchange.setException(new
 ExchangeTimedOutException(exchange, holder.getRequestTimeout()));
            } else {...}

 =
 endpoint id=queue_esb
 uri=ibmmq:ESB.REQ?replyTo=ESB.RPLrequestTimeout=3useMessageIDAsCorrelationID=true/

 setHeader headerName=ServiceUser
        simple${properties:esb.user}/simple
 /setHeader
 setHeader headerName=ServiceUserCredentials
        simple${properties:esb.user.credentials}/simple
 /setHeader
 to ref=queue_esb pattern=InOut /

 Exception originalException =
 exchange.getProperty(Exchange.EXCEPTION_CAUGHT, Exception.class);
 LOGGER.info(Original Exception stacktrace:  +
 getStackTrace(originalException));

          public static String getStackTrace(Throwable aThrowable) {
                    final Writer result = new StringWriter();
                    final PrintWriter printWriter = new PrintWriter(result);
                    aThrowable.printStackTrace(printWriter);
                    return result.toString();
                  }
 ==

 2011-11-07 17:07:52,833 | INFO  | accountreportingrequestv02.UtilitiesBean |
 *Original Exception stacktrace:* org.apache.camel.ExchangeTimedOutException:
 The OUT message was not received within: 3 millis. Exchange[JmsMessage:
 JMS Message class: jms_bytes
  JMSType:         null
  JMSDeliveryMode: 2
  JMSExpiration:   0
  JMSPriority:     4
  JMSMessageID:    ID:414d512056494c3130375544202020204e9d7a71203f731c
  JMSTimestamp:    1320678442590
  JMSCorrelationID:test
  JMSDestination:  queue:///...
  JMSReplyTo:      queue:///...
  JMSRedelivered:  false
  JMS_IBM_Character_Set:UTF8
  JMSXAppID:WebSphere MQ Client for Java
  JMS_IBM_Format:
  Content_HYPHEN_Length:1340
  JMS_IBM_PutApplType:28
  JMS_IBM_PutDate:2007
  CamelHttpCharacterEncoding:UTF-8
  MQReplyTo:queue
  *ServiceUser: user*
  *ServiceUserCredentials: pass*
  SOAPAction:
  CamelHttpPath:/mq_path
  MQ:queue
  JMS_IBM_MsgType:1
  CamelHttpMethod:POST
  JMS_IBM_Encoding:273
  JMSXDeliveryCount:1
  JMS_IBM_PutTime:15051041
  Host:10.180.235.212
  JMSXUserID:mqm
  User_HYPHEN_Agent:Jakarta Commons-HttpClient/3.1
  Content_HYPHEN_Type:text/xml;charset=UTF-8
  CamelHttpUrl:http://10.180.235.212/mq_path
  CamelHttpUri:/mq_path
  SOAPJMS_soapAction:urn:aaa
 Integer encoding: 1, Floating point encoding 256
 3c736f6170656e763a456e76656c6f706520786d6c6e733a736f6170656e763d22687474703a2f2f
 736368656d61732e786d6c736f61702e6f72672f736f61702f656e76656c6f70652f2220786d6c6e
 733a75726e3d2275726e3a69736f3a7374643a69736f3a32303032323a746563683a7873643a6361
 6d742e3036302e3030312e30325f74657374223e0a2020203c736f6170656e763a426f64793e0a20
 20202020203c75726e3a446f63756d656e743e0a2020202020202020203c75726e3a416363745270
 74675265713e0a2020202020202020202020203c75726e3a4772704864723e0a2020202020202020
 202020202020203c75726e3a4d736749643e746573745f65655f736f61705f3132303c2f75726e3a
 4d736749643e0a2020202020202020202020202020203c75726e3a4372654474546d3e323031312d
 31302d32305431323a35303a30392e3235343c2f75726e3a4372654474546d3e0a20202020202020
 20202020203c2f75726e3a4772704864723e0a2020202020202020202020203c212d2d31206f7220
 ...
 ]
        at
 org.apache.camel.component.jms.reply.ReplyManagerSupport.processReply(ReplyManagerSupport.java:121)
        at
 org.apache.camel.component.jms.reply.TemporaryQueueReplyHandler.onTimeout(TemporaryQueueReplyHandler.java:59)
        at
 org.apache.camel.component.jms.reply.PersistentQueueReplyHandler.onTimeout(PersistentQueueReplyHandler.java:54)
        at
 org.apache.camel.component.jms.reply.CorrelationMap.onEviction(CorrelationMap.java:34)
        at
 org.apache.camel.component.jms.reply.CorrelationMap.onEviction(CorrelationMap.java:26)
        at
 org.apache.camel.util.DefaultTimeoutMap.purge(DefaultTimeoutMap.java:206)
        at
 org.apache.camel.util.DefaultTimeoutMap.run(DefaultTimeoutMap.java:158)
        at
 

Re: ExchangeTimedOutException: The OUT message was not received within: 20000 millis.

2010-06-03 Thread Claus Ibsen
Are you sending request/reply or fire and forget messaging over JMS?

When you get that 20 sec timeout then its because Camel uses InOut and
expects a reply being send back to JMSReplyTo.

See
http://camel.apache.org/event-message.html
http://camel.apache.org/request-reply.html

On Thu, Jun 3, 2010 at 10:28 AM, lekkie lekkie.ay...@gmail.com wrote:

 Hi Guys,

 I have this requirement where the source queue and destination queue are on
 separate brokers. See the config below:

 bean id=requestJMSConnectionFactory
 class=org.apache.activemq.ActiveMQConnectionFactory
                property name=alwaysSessionAsync value=false/
                property name=alwaysSyncSend value=true/
                property 
 name=brokerURLvalue${request-queue-url}/value/property
                property name=clientID value=/
                property name=closeTimeout value=15000/
                property name=copyMessageOnSend value=true/
                property name=disableTimeStampsByDefault value=false/
                property name=dispatchAsync value=false/
                property name=objectMessageSerializationDefered 
 value=false/
                property name=optimizeAcknowledge value=false/
                property name=optimizedMessageDispatch value=true/
                property name=password value=/
                property name=producerWindowSize value=0/
                property name=statsEnabled value=false/
                property name=useAsyncSend value=false/
                property name=useCompression value=false/
                property name=useRetroactiveConsumer value=false/
                property name=userName value=/
                property name=watchTopicAdvisories value=true/
                property name=sendTimeout value=0/
                property name=redeliveryPolicy ref=redeliveryPolicy/
        /bean

        bean id=responseJMSConnectionFactory
 class=org.apache.activemq.ActiveMQConnectionFactory
                property name=alwaysSessionAsync value=false/
                property name=alwaysSyncSend value=true/
                property 
 name=brokerURLvalue${response-queue-url}/value/property
                property name=clientID value=/
                property name=closeTimeout value=15000/
                property name=copyMessageOnSend value=true/
                property name=disableTimeStampsByDefault value=false/
                property name=dispatchAsync value=false/
                property name=objectMessageSerializationDefered 
 value=false/
                property name=optimizeAcknowledge value=false/
                property name=optimizedMessageDispatch value=true/
                property name=password value=/
                property name=producerWindowSize value=0/
                property name=statsEnabled value=false/
                property name=useAsyncSend value=false/
                property name=useCompression value=false/
                property name=useRetroactiveConsumer value=false/
                property name=userName value=/
                property name=watchTopicAdvisories value=true/
                property name=sendTimeout value=0/
                property name=redeliveryPolicy ref=redeliveryPolicy/
        /bean

        bean id=requestJMSTransactionManager
 class=org.springframework.jms.connection.JmsTransactionManager
            property name=connectionFactory 
 ref=requestJMSConnectionFactory /
        /bean

        bean id=responseJMSTransactionManager
 class=org.springframework.jms.connection.JmsTransactionManager
            property name=connectionFactory 
 ref=responseJMSConnectionFactory
 /
        /bean


        bean id=requestJMSConfig
 class=org.apache.camel.component.jms.JmsConfiguration
            property name=connectionFactory 
 ref=requestJMSConnectionFactory/
            property name=transactionManager
 ref=requestJMSTransactionManager/
            property name=transacted value=true/
            property name=concurrentConsumers value=2/
            property name=timeToLive value=8640/
                property name=deliveryPersistent value=true/
                property name=explicitQosEnabled value=true/
                property name=priority value=9/
                property name=transactedInOut value=true/
        /bean

        bean id=responseJMSConfig
 class=org.apache.camel.component.jms.JmsConfiguration
            property name=connectionFactory 
 ref=responseJMSConnectionFactory/
            property name=transactionManager
 ref=responseJMSTransactionManager/
            property name=transacted value=true/
            property name=concurrentConsumers value=2/
            property name=timeToLive value=8640/
                property name=deliveryPersistent value=true/
                property name=explicitQosEnabled value=true/
                property name=priority value=9/
                property name=transactedInOut value=true/
        /bean

        bean id=REQUEST_PROPAGATION_REQUIRED
 

Re: ExchangeTimedOutException: The OUT message was not received within: 20000 millis.

2010-06-03 Thread lekkie

I eventually figured this put.

I had to wiretap the response.

THanks.


Claus Ibsen-2 wrote:
 
 Are you sending request/reply or fire and forget messaging over JMS?
 
 When you get that 20 sec timeout then its because Camel uses InOut and
 expects a reply being send back to JMSReplyTo.
 
 See
 http://camel.apache.org/event-message.html
 http://camel.apache.org/request-reply.html
 
 On Thu, Jun 3, 2010 at 10:28 AM, lekkie lekkie.ay...@gmail.com wrote:

 Hi Guys,

 I have this requirement where the source queue and destination queue are
 on
 separate brokers. See the config below:

 bean id=requestJMSConnectionFactory
 class=org.apache.activemq.ActiveMQConnectionFactory
                property name=alwaysSessionAsync value=false/
                property name=alwaysSyncSend value=true/
                property
 name=brokerURLvalue${request-queue-url}/value/property
                property name=clientID value=/
                property name=closeTimeout value=15000/
                property name=copyMessageOnSend value=true/
                property name=disableTimeStampsByDefault
 value=false/
                property name=dispatchAsync value=false/
                property name=objectMessageSerializationDefered
 value=false/
                property name=optimizeAcknowledge value=false/
                property name=optimizedMessageDispatch value=true/
                property name=password value=/
                property name=producerWindowSize value=0/
                property name=statsEnabled value=false/
                property name=useAsyncSend value=false/
                property name=useCompression value=false/
                property name=useRetroactiveConsumer value=false/
                property name=userName value=/
                property name=watchTopicAdvisories value=true/
                property name=sendTimeout value=0/
                property name=redeliveryPolicy ref=redeliveryPolicy/
        /bean

        bean id=responseJMSConnectionFactory
 class=org.apache.activemq.ActiveMQConnectionFactory
                property name=alwaysSessionAsync value=false/
                property name=alwaysSyncSend value=true/
                property
 name=brokerURLvalue${response-queue-url}/value/property
                property name=clientID value=/
                property name=closeTimeout value=15000/
                property name=copyMessageOnSend value=true/
                property name=disableTimeStampsByDefault
 value=false/
                property name=dispatchAsync value=false/
                property name=objectMessageSerializationDefered
 value=false/
                property name=optimizeAcknowledge value=false/
                property name=optimizedMessageDispatch value=true/
                property name=password value=/
                property name=producerWindowSize value=0/
                property name=statsEnabled value=false/
                property name=useAsyncSend value=false/
                property name=useCompression value=false/
                property name=useRetroactiveConsumer value=false/
                property name=userName value=/
                property name=watchTopicAdvisories value=true/
                property name=sendTimeout value=0/
                property name=redeliveryPolicy ref=redeliveryPolicy/
        /bean

        bean id=requestJMSTransactionManager
 class=org.springframework.jms.connection.JmsTransactionManager
            property name=connectionFactory
 ref=requestJMSConnectionFactory /
        /bean

        bean id=responseJMSTransactionManager
 class=org.springframework.jms.connection.JmsTransactionManager
            property name=connectionFactory
 ref=responseJMSConnectionFactory
 /
        /bean


        bean id=requestJMSConfig
 class=org.apache.camel.component.jms.JmsConfiguration
            property name=connectionFactory
 ref=requestJMSConnectionFactory/
            property name=transactionManager
 ref=requestJMSTransactionManager/
            property name=transacted value=true/
            property name=concurrentConsumers value=2/
            property name=timeToLive value=8640/
                property name=deliveryPersistent value=true/
                property name=explicitQosEnabled value=true/
                property name=priority value=9/
                property name=transactedInOut value=true/
        /bean

        bean id=responseJMSConfig
 class=org.apache.camel.component.jms.JmsConfiguration
            property name=connectionFactory
 ref=responseJMSConnectionFactory/
            property name=transactionManager
 ref=responseJMSTransactionManager/
            property name=transacted value=true/
            property name=concurrentConsumers value=2/
            property name=timeToLive value=8640/
                property name=deliveryPersistent value=true/
                property name=explicitQosEnabled value=true/
                property name=priority value=9/