[ 
https://issues.apache.org/jira/browse/CAMEL-27425?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Claus Ibsen updated CAMEL-27425:
--------------------------------
    Description: 
When a JMS consumer route fails on a message that expects a reply (the message 
has a JMSReplyTo), Camel sends no reply. The caller waits until its 
requestTimeout and then fails with ExchangeTimedOutException. The consumer logs 
only the failure:

{noformat}
Execution of JMS message listener failed. Caused by: 
[org.apache.camel.RuntimeCamelException - java.lang.Exception: not enough 
CAMEL-CAP]
{noformat}

The timeout of the caller comes later (20 seconds by default), in another 
route, and its message (CAMEL-27119) cannot say that the consumer failed. 
Nothing links the two.

Seen in the AI benchmark (connect-service-jms-request-reply step 4): the 
replying route throws when the stock is too low. In 3 runs the model saw the 
listener failure 2 or 3 times, but never the cause of the timeout. It thought 
the redelivery did not happen, and rewrote the error handler until the step 
ended.

Improvement: when the exchange of a message that expects a reply fails, and no 
reply is sent, the failure that the consumer logs says so, and what to do:

{noformat}
java.lang.Exception: not enough CAMEL-CAP. No reply is sent (JMSReplyTo ...), 
as the exchange failed: the caller waits until its requestTimeout and then 
fails with ExchangeTimedOutException. To make the caller fail at once, reply 
with a message that says the request failed and check it in the caller
{noformat}

The hint does not suggest transferException, which sends the exception back as 
a serialized Java object.

For camel-jms and camel-sjms. The exception keeps its cause, and its message 
starts as before.

  was:
When a JMS consumer route fails on a message that expects a reply (the message 
has a JMSReplyTo), Camel sends no reply, unless transferException=true. The 
caller waits until its requestTimeout and then fails with 
ExchangeTimedOutException. The consumer logs only the failure:

{noformat}
Execution of JMS message listener failed. Caused by: 
[org.apache.camel.RuntimeCamelException - java.lang.Exception: not enough 
CAMEL-CAP]
{noformat}

The timeout of the caller comes later (20 seconds by default), in another 
route, and its message (CAMEL-27119) cannot say that the consumer failed. 
Nothing links the two.

Seen in the AI benchmark (connect-service-jms-request-reply step 4): the 
replying route throws when the stock is too low. In 3 runs the model saw the 
listener failure 2 or 3 times, but never the cause of the timeout. It thought 
the redelivery did not happen, and rewrote the error handler until the step 
ended.

Improvement: when the exchange of a message that expects a reply fails, and no 
reply is sent, the failure that the consumer logs says so, and what to do:

{noformat}
java.lang.Exception: not enough CAMEL-CAP. No reply is sent (JMSReplyTo ...), 
as the exchange failed: the caller waits until its requestTimeout and then 
fails with ExchangeTimedOutException. To make the caller fail at once, reply 
with a message that says the request failed and check it in the caller, or set 
transferException=true to send the exception back (with 
objectMessageEnabled=true on both sides)
{noformat}

For camel-jms and camel-sjms. The exception keeps its cause, and its message 
starts as before.


> camel-jms, camel-sjms - a failed request says that no reply is sent, and the 
> caller waits
> -----------------------------------------------------------------------------------------
>
>                 Key: CAMEL-27425
>                 URL: https://issues.apache.org/jira/browse/CAMEL-27425
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-jms, camel-sjms
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 4.24.0
>
>
> When a JMS consumer route fails on a message that expects a reply (the 
> message has a JMSReplyTo), Camel sends no reply. The caller waits until its 
> requestTimeout and then fails with ExchangeTimedOutException. The consumer 
> logs only the failure:
> {noformat}
> Execution of JMS message listener failed. Caused by: 
> [org.apache.camel.RuntimeCamelException - java.lang.Exception: not enough 
> CAMEL-CAP]
> {noformat}
> The timeout of the caller comes later (20 seconds by default), in another 
> route, and its message (CAMEL-27119) cannot say that the consumer failed. 
> Nothing links the two.
> Seen in the AI benchmark (connect-service-jms-request-reply step 4): the 
> replying route throws when the stock is too low. In 3 runs the model saw the 
> listener failure 2 or 3 times, but never the cause of the timeout. It thought 
> the redelivery did not happen, and rewrote the error handler until the step 
> ended.
> Improvement: when the exchange of a message that expects a reply fails, and 
> no reply is sent, the failure that the consumer logs says so, and what to do:
> {noformat}
> java.lang.Exception: not enough CAMEL-CAP. No reply is sent (JMSReplyTo ...), 
> as the exchange failed: the caller waits until its requestTimeout and then 
> fails with ExchangeTimedOutException. To make the caller fail at once, reply 
> with a message that says the request failed and check it in the caller
> {noformat}
> The hint does not suggest transferException, which sends the exception back 
> as a serialized Java object.
> For camel-jms and camel-sjms. The exception keeps its cause, and its message 
> starts as before.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to