You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Raul Kripalani (JIRA)" <ji...@apache.org> on 2012/07/24 15:02:34 UTC

[jira] [Created] (CAMEL-5464) camel-jms consumer doesn't send back a reply in all cases

Raul Kripalani created CAMEL-5464:
-------------------------------------

             Summary: camel-jms consumer doesn't send back a reply in all cases
                 Key: CAMEL-5464
                 URL: https://issues.apache.org/jira/browse/CAMEL-5464
             Project: Camel
          Issue Type: Bug
          Components: camel-activemq, camel-jms
    Affects Versions: 2.10.0, 2.9.2, 2.8.6
            Reporter: Raul Kripalani
             Fix For: 2.10.1


In a very simple route consuming from a Camel JMS endpoint receiving InOut exchanges (i.e. JMSReplyTo header present), the endpoint will not send back replies.

This happens because Camel JMS only returns a reply if the OUT message is set. But if the route looks like: consumer => processor, and Camel doesn't find the need to "weave in" an implicit Pipeline processor, no one will implicitly take care of mapping the IN message to an OUT message (unless the user knows about these internal aspects - but we shouldn't expect them too).

As a result, these routes DON'T WORK...

{code}
<route>
   <from uri="timer:foo?fixedRate=true&amp;period=10000" />
   <setBody><constant>Hello Raul</constant></setBody>
   <to uri="log:SendingRequest?showAll=true" />
   <inOut uri="activemq:queue:test1?requestTimeout=1000" />
   <to uri="log:ReceivedReply?showAll=true" />
</route>
        
<route>
   <from uri="activemq:queue:test1" />
   <to uri="log:ReceivedRequest?showAll=true" />
</route>
{code}

... but just by adding an additional log endpoint to the second route (or any other thing, for that matter), it starts to work because Camel weaves in the Pipeline processor.

Other workarounds that work:
* explicitly wrapping the log endpoint in a <pipeline> DSL
* <setBody><simple>${in.body}</simple></setBody>

Or simply introducing anything that will force Camel to insert a Pipeline processor.

IMHO, there are two solutions to avoid this issue:
# Always weave in a Pipeline processor (adds overhead in simple routes and may cause regressions)
# Adapt EndpointMessageListener to pick the IN message when the exchange is out capable and expectation of a reply exists

I'm happy to work on a patch for Camel 2.10.1.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CAMEL-5464) camel-jms consumer doesn't send back a reply in all cases

Posted by "Raul Kripalani (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-5464?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Raul Kripalani updated CAMEL-5464:
----------------------------------

    Description: 
In a very simple route consuming from a Camel JMS endpoint receiving InOut exchanges (i.e. JMSReplyTo header present), the endpoint will not send back replies.

This happens because Camel JMS only returns a reply if the OUT message is set. But if the route looks like: consumer => processor, and Camel doesn't find the need to "weave in" an implicit Pipeline processor, no one will implicitly take care of mapping the IN message to an OUT message (unless the user knows about these internal aspects - but we shouldn't expect them too).

As a result, these routes DON'T WORK...

{code}
<route>
   <from uri="timer:foo?fixedRate=true&amp;period=10000" />
   <setBody><constant>Hello Raul</constant></setBody>
   <to uri="log:SendingRequest?showAll=true" />
   <inOut uri="activemq:queue:test1?requestTimeout=1000" />
   <to uri="log:ReceivedReply?showAll=true" />
</route>
        
<route>
   <from uri="activemq:queue:test1" />
   <to uri="log:ReceivedRequest?showAll=true" />
</route>
{code}

... but just by adding an additional log endpoint to the second route (or any other thing, for that matter), it starts to work because Camel weaves in the Pipeline processor.

Other workarounds that work:
* -explicitly wrapping the log endpoint in a <pipeline> DSL-
* <setBody><simple>${in.body}</simple></setBody>

Or simply introducing anything that will force Camel to insert a Pipeline processor.

IMHO, there are two solutions to avoid this issue:
# Always weave in a Pipeline processor (adds overhead in simple routes and may cause regressions)
# Adapt EndpointMessageListener to pick the IN message when the exchange is out capable and expectation of a reply exists

I'm happy to work on a patch for Camel 2.10.1.

*EDIT:* Just wrapping the single endpoint in <pipeline /> doesn't function as a workaround.

  was:
In a very simple route consuming from a Camel JMS endpoint receiving InOut exchanges (i.e. JMSReplyTo header present), the endpoint will not send back replies.

This happens because Camel JMS only returns a reply if the OUT message is set. But if the route looks like: consumer => processor, and Camel doesn't find the need to "weave in" an implicit Pipeline processor, no one will implicitly take care of mapping the IN message to an OUT message (unless the user knows about these internal aspects - but we shouldn't expect them too).

As a result, these routes DON'T WORK...

{code}
<route>
   <from uri="timer:foo?fixedRate=true&amp;period=10000" />
   <setBody><constant>Hello Raul</constant></setBody>
   <to uri="log:SendingRequest?showAll=true" />
   <inOut uri="activemq:queue:test1?requestTimeout=1000" />
   <to uri="log:ReceivedReply?showAll=true" />
</route>
        
<route>
   <from uri="activemq:queue:test1" />
   <to uri="log:ReceivedRequest?showAll=true" />
</route>
{code}

... but just by adding an additional log endpoint to the second route (or any other thing, for that matter), it starts to work because Camel weaves in the Pipeline processor.

Other workarounds that work:
* explicitly wrapping the log endpoint in a <pipeline> DSL
* <setBody><simple>${in.body}</simple></setBody>

Or simply introducing anything that will force Camel to insert a Pipeline processor.

IMHO, there are two solutions to avoid this issue:
# Always weave in a Pipeline processor (adds overhead in simple routes and may cause regressions)
# Adapt EndpointMessageListener to pick the IN message when the exchange is out capable and expectation of a reply exists

I'm happy to work on a patch for Camel 2.10.1.

    
> camel-jms consumer doesn't send back a reply in all cases
> ---------------------------------------------------------
>
>                 Key: CAMEL-5464
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5464
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-activemq, camel-jms
>    Affects Versions: 2.8.6, 2.9.2, 2.10.0
>            Reporter: Raul Kripalani
>             Fix For: 2.10.1
>
>
> In a very simple route consuming from a Camel JMS endpoint receiving InOut exchanges (i.e. JMSReplyTo header present), the endpoint will not send back replies.
> This happens because Camel JMS only returns a reply if the OUT message is set. But if the route looks like: consumer => processor, and Camel doesn't find the need to "weave in" an implicit Pipeline processor, no one will implicitly take care of mapping the IN message to an OUT message (unless the user knows about these internal aspects - but we shouldn't expect them too).
> As a result, these routes DON'T WORK...
> {code}
> <route>
>    <from uri="timer:foo?fixedRate=true&amp;period=10000" />
>    <setBody><constant>Hello Raul</constant></setBody>
>    <to uri="log:SendingRequest?showAll=true" />
>    <inOut uri="activemq:queue:test1?requestTimeout=1000" />
>    <to uri="log:ReceivedReply?showAll=true" />
> </route>
>         
> <route>
>    <from uri="activemq:queue:test1" />
>    <to uri="log:ReceivedRequest?showAll=true" />
> </route>
> {code}
> ... but just by adding an additional log endpoint to the second route (or any other thing, for that matter), it starts to work because Camel weaves in the Pipeline processor.
> Other workarounds that work:
> * -explicitly wrapping the log endpoint in a <pipeline> DSL-
> * <setBody><simple>${in.body}</simple></setBody>
> Or simply introducing anything that will force Camel to insert a Pipeline processor.
> IMHO, there are two solutions to avoid this issue:
> # Always weave in a Pipeline processor (adds overhead in simple routes and may cause regressions)
> # Adapt EndpointMessageListener to pick the IN message when the exchange is out capable and expectation of a reply exists
> I'm happy to work on a patch for Camel 2.10.1.
> *EDIT:* Just wrapping the single endpoint in <pipeline /> doesn't function as a workaround.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CAMEL-5464) camel-jms consumer doesn't send back a reply in all cases

Posted by "James Carman (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-5464?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

James Carman updated CAMEL-5464:
--------------------------------

    Attachment: CAMEL-5464.patch

Here's a patch that implements option #2.  Let me know if you see any regressions.  I can't get the full Maven build working on my computer right now.
                
> camel-jms consumer doesn't send back a reply in all cases
> ---------------------------------------------------------
>
>                 Key: CAMEL-5464
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5464
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-activemq, camel-jms
>    Affects Versions: 2.8.6, 2.9.2, 2.10.0
>            Reporter: Raul Kripalani
>         Attachments: CAMEL-5464.patch
>
>
> In a very simple route consuming from a Camel JMS endpoint receiving InOut exchanges (i.e. JMSReplyTo header present), the endpoint will not send back replies.
> This happens because Camel JMS only returns a reply if the OUT message is set. But if the route looks like: consumer => processor, and Camel doesn't find the need to "weave in" an implicit Pipeline processor, no one will implicitly take care of mapping the IN message to an OUT message (unless the user knows about these internal aspects - but we shouldn't expect them too).
> As a result, these routes DON'T WORK...
> {code}
> <route>
>    <from uri="timer:foo?fixedRate=true&amp;period=10000" />
>    <setBody><constant>Hello Raul</constant></setBody>
>    <to uri="log:SendingRequest?showAll=true" />
>    <inOut uri="activemq:queue:test1?requestTimeout=1000" />
>    <to uri="log:ReceivedReply?showAll=true" />
> </route>
>         
> <route>
>    <from uri="activemq:queue:test1" />
>    <to uri="log:ReceivedRequest?showAll=true" />
> </route>
> {code}
> ... but just by adding an additional log endpoint to the second route (or any other thing, for that matter), it starts to work because Camel weaves in the Pipeline processor.
> Other workarounds that work:
> * -explicitly wrapping the log endpoint in a <pipeline> DSL-
> * <setBody><simple>${in.body}</simple></setBody>
> Or simply introducing anything that will force Camel to insert a Pipeline processor.
> IMHO, there are two solutions to avoid this issue:
> # Always weave in a Pipeline processor (adds overhead in simple routes and may cause regressions)
> # Adapt EndpointMessageListener to pick the IN message when the exchange is out capable and expectation of a reply exists
> I'm happy to work on a patch for Camel 2.10.1.
> *EDIT:* Just wrapping the single endpoint in <pipeline /> doesn't function as a workaround.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CAMEL-5464) camel-jms consumer doesn't send back a reply in all cases

Posted by "Willem Jiang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-5464?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13445765#comment-13445765 ] 

Willem Jiang commented on CAMEL-5464:
-------------------------------------

Applied patch with thanks to James.
                
> camel-jms consumer doesn't send back a reply in all cases
> ---------------------------------------------------------
>
>                 Key: CAMEL-5464
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5464
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-activemq, camel-jms
>    Affects Versions: 2.8.6, 2.9.2, 2.10.0
>            Reporter: Raul Kripalani
>            Assignee: Willem Jiang
>         Attachments: CAMEL-5464.patch
>
>
> In a very simple route consuming from a Camel JMS endpoint receiving InOut exchanges (i.e. JMSReplyTo header present), the endpoint will not send back replies.
> This happens because Camel JMS only returns a reply if the OUT message is set. But if the route looks like: consumer => processor, and Camel doesn't find the need to "weave in" an implicit Pipeline processor, no one will implicitly take care of mapping the IN message to an OUT message (unless the user knows about these internal aspects - but we shouldn't expect them too).
> As a result, these routes DON'T WORK...
> {code}
> <route>
>    <from uri="timer:foo?fixedRate=true&amp;period=10000" />
>    <setBody><constant>Hello Raul</constant></setBody>
>    <to uri="log:SendingRequest?showAll=true" />
>    <inOut uri="activemq:queue:test1?requestTimeout=1000" />
>    <to uri="log:ReceivedReply?showAll=true" />
> </route>
>         
> <route>
>    <from uri="activemq:queue:test1" />
>    <to uri="log:ReceivedRequest?showAll=true" />
> </route>
> {code}
> ... but just by adding an additional log endpoint to the second route (or any other thing, for that matter), it starts to work because Camel weaves in the Pipeline processor.
> Other workarounds that work:
> * -explicitly wrapping the log endpoint in a <pipeline> DSL-
> * <setBody><simple>${in.body}</simple></setBody>
> Or simply introducing anything that will force Camel to insert a Pipeline processor.
> IMHO, there are two solutions to avoid this issue:
> # Always weave in a Pipeline processor (adds overhead in simple routes and may cause regressions)
> # Adapt EndpointMessageListener to pick the IN message when the exchange is out capable and expectation of a reply exists
> I'm happy to work on a patch for Camel 2.10.1.
> *EDIT:* Just wrapping the single endpoint in <pipeline /> doesn't function as a workaround.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CAMEL-5464) camel-jms consumer doesn't send back a reply in all cases

Posted by "Willem Jiang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-5464?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13445750#comment-13445750 ] 

Willem Jiang commented on CAMEL-5464:
-------------------------------------

The patch broke some tests of the camel-jms. After digging the tests, I found the tests keep the out message null to no send the response back. It can be fixed easily by changing the MEP to InOnly.
As this feature break the backward compatibility, I don't plan to merge the patch back to other branch. 
                
> camel-jms consumer doesn't send back a reply in all cases
> ---------------------------------------------------------
>
>                 Key: CAMEL-5464
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5464
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-activemq, camel-jms
>    Affects Versions: 2.8.6, 2.9.2, 2.10.0
>            Reporter: Raul Kripalani
>            Assignee: Willem Jiang
>         Attachments: CAMEL-5464.patch
>
>
> In a very simple route consuming from a Camel JMS endpoint receiving InOut exchanges (i.e. JMSReplyTo header present), the endpoint will not send back replies.
> This happens because Camel JMS only returns a reply if the OUT message is set. But if the route looks like: consumer => processor, and Camel doesn't find the need to "weave in" an implicit Pipeline processor, no one will implicitly take care of mapping the IN message to an OUT message (unless the user knows about these internal aspects - but we shouldn't expect them too).
> As a result, these routes DON'T WORK...
> {code}
> <route>
>    <from uri="timer:foo?fixedRate=true&amp;period=10000" />
>    <setBody><constant>Hello Raul</constant></setBody>
>    <to uri="log:SendingRequest?showAll=true" />
>    <inOut uri="activemq:queue:test1?requestTimeout=1000" />
>    <to uri="log:ReceivedReply?showAll=true" />
> </route>
>         
> <route>
>    <from uri="activemq:queue:test1" />
>    <to uri="log:ReceivedRequest?showAll=true" />
> </route>
> {code}
> ... but just by adding an additional log endpoint to the second route (or any other thing, for that matter), it starts to work because Camel weaves in the Pipeline processor.
> Other workarounds that work:
> * -explicitly wrapping the log endpoint in a <pipeline> DSL-
> * <setBody><simple>${in.body}</simple></setBody>
> Or simply introducing anything that will force Camel to insert a Pipeline processor.
> IMHO, there are two solutions to avoid this issue:
> # Always weave in a Pipeline processor (adds overhead in simple routes and may cause regressions)
> # Adapt EndpointMessageListener to pick the IN message when the exchange is out capable and expectation of a reply exists
> I'm happy to work on a patch for Camel 2.10.1.
> *EDIT:* Just wrapping the single endpoint in <pipeline /> doesn't function as a workaround.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CAMEL-5464) camel-jms consumer doesn't send back a reply in all cases

Posted by "James Carman (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-5464?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13445928#comment-13445928 ] 

James Carman commented on CAMEL-5464:
-------------------------------------

Okay, cool!  Sorry about the regression.  I was (and still am) having a terrible time getting the build to run locally on my machine.  I'll keep tinkering.  This is my first Mac laptop, so getting used to Java development on here is somewhat of a chore.  Perhaps I'll just switch to a VM or something
                
> camel-jms consumer doesn't send back a reply in all cases
> ---------------------------------------------------------
>
>                 Key: CAMEL-5464
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5464
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-activemq, camel-jms
>    Affects Versions: 2.8.6, 2.9.2, 2.10.0
>            Reporter: Raul Kripalani
>            Assignee: Willem Jiang
>         Attachments: CAMEL-5464.patch
>
>
> In a very simple route consuming from a Camel JMS endpoint receiving InOut exchanges (i.e. JMSReplyTo header present), the endpoint will not send back replies.
> This happens because Camel JMS only returns a reply if the OUT message is set. But if the route looks like: consumer => processor, and Camel doesn't find the need to "weave in" an implicit Pipeline processor, no one will implicitly take care of mapping the IN message to an OUT message (unless the user knows about these internal aspects - but we shouldn't expect them too).
> As a result, these routes DON'T WORK...
> {code}
> <route>
>    <from uri="timer:foo?fixedRate=true&amp;period=10000" />
>    <setBody><constant>Hello Raul</constant></setBody>
>    <to uri="log:SendingRequest?showAll=true" />
>    <inOut uri="activemq:queue:test1?requestTimeout=1000" />
>    <to uri="log:ReceivedReply?showAll=true" />
> </route>
>         
> <route>
>    <from uri="activemq:queue:test1" />
>    <to uri="log:ReceivedRequest?showAll=true" />
> </route>
> {code}
> ... but just by adding an additional log endpoint to the second route (or any other thing, for that matter), it starts to work because Camel weaves in the Pipeline processor.
> Other workarounds that work:
> * -explicitly wrapping the log endpoint in a <pipeline> DSL-
> * <setBody><simple>${in.body}</simple></setBody>
> Or simply introducing anything that will force Camel to insert a Pipeline processor.
> IMHO, there are two solutions to avoid this issue:
> # Always weave in a Pipeline processor (adds overhead in simple routes and may cause regressions)
> # Adapt EndpointMessageListener to pick the IN message when the exchange is out capable and expectation of a reply exists
> I'm happy to work on a patch for Camel 2.10.1.
> *EDIT:* Just wrapping the single endpoint in <pipeline /> doesn't function as a workaround.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Comment Edited] (CAMEL-5464) camel-jms consumer doesn't send back a reply in all cases

Posted by "James Carman (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-5464?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13445928#comment-13445928 ] 

James Carman edited comment on CAMEL-5464 at 9/1/12 3:30 AM:
-------------------------------------------------------------

Okay, cool!  Sorry about the regression.  I was (and still am) having a terrible time getting the build to run locally on my machine.  I'll keep tinkering.  This is my first Mac laptop, so getting used to Java development on here is somewhat of a chore.  Perhaps I'll just switch to a VM or something

Are we going to update the fix versions/status?
                
      was (Author: jwcarman):
    Okay, cool!  Sorry about the regression.  I was (and still am) having a terrible time getting the build to run locally on my machine.  I'll keep tinkering.  This is my first Mac laptop, so getting used to Java development on here is somewhat of a chore.  Perhaps I'll just switch to a VM or something
                  
> camel-jms consumer doesn't send back a reply in all cases
> ---------------------------------------------------------
>
>                 Key: CAMEL-5464
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5464
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-activemq, camel-jms
>    Affects Versions: 2.8.6, 2.9.2, 2.10.0
>            Reporter: Raul Kripalani
>            Assignee: Willem Jiang
>         Attachments: CAMEL-5464.patch
>
>
> In a very simple route consuming from a Camel JMS endpoint receiving InOut exchanges (i.e. JMSReplyTo header present), the endpoint will not send back replies.
> This happens because Camel JMS only returns a reply if the OUT message is set. But if the route looks like: consumer => processor, and Camel doesn't find the need to "weave in" an implicit Pipeline processor, no one will implicitly take care of mapping the IN message to an OUT message (unless the user knows about these internal aspects - but we shouldn't expect them too).
> As a result, these routes DON'T WORK...
> {code}
> <route>
>    <from uri="timer:foo?fixedRate=true&amp;period=10000" />
>    <setBody><constant>Hello Raul</constant></setBody>
>    <to uri="log:SendingRequest?showAll=true" />
>    <inOut uri="activemq:queue:test1?requestTimeout=1000" />
>    <to uri="log:ReceivedReply?showAll=true" />
> </route>
>         
> <route>
>    <from uri="activemq:queue:test1" />
>    <to uri="log:ReceivedRequest?showAll=true" />
> </route>
> {code}
> ... but just by adding an additional log endpoint to the second route (or any other thing, for that matter), it starts to work because Camel weaves in the Pipeline processor.
> Other workarounds that work:
> * -explicitly wrapping the log endpoint in a <pipeline> DSL-
> * <setBody><simple>${in.body}</simple></setBody>
> Or simply introducing anything that will force Camel to insert a Pipeline processor.
> IMHO, there are two solutions to avoid this issue:
> # Always weave in a Pipeline processor (adds overhead in simple routes and may cause regressions)
> # Adapt EndpointMessageListener to pick the IN message when the exchange is out capable and expectation of a reply exists
> I'm happy to work on a patch for Camel 2.10.1.
> *EDIT:* Just wrapping the single endpoint in <pipeline /> doesn't function as a workaround.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CAMEL-5464) camel-jms consumer doesn't send back a reply in all cases

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-5464?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13492226#comment-13492226 ] 

Claus Ibsen commented on CAMEL-5464:
------------------------------------

I think this fix is more important, than those odd unit-tests that was needed to change.

If you do request/reply over JMS, then you would expect Camel to send back the reply always - also if the route, only do a single step like
from JMS
  to bean

So I am working on backporting this to older branches.
                
> camel-jms consumer doesn't send back a reply in all cases
> ---------------------------------------------------------
>
>                 Key: CAMEL-5464
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5464
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-activemq, camel-jms
>    Affects Versions: 2.8.6, 2.9.2, 2.10.0
>            Reporter: Raul Kripalani
>            Assignee: Willem Jiang
>             Fix For: 2.9.5, 2.10.3, 2.11.0
>
>         Attachments: CAMEL-5464.patch
>
>
> In a very simple route consuming from a Camel JMS endpoint receiving InOut exchanges (i.e. JMSReplyTo header present), the endpoint will not send back replies.
> This happens because Camel JMS only returns a reply if the OUT message is set. But if the route looks like: consumer => processor, and Camel doesn't find the need to "weave in" an implicit Pipeline processor, no one will implicitly take care of mapping the IN message to an OUT message (unless the user knows about these internal aspects - but we shouldn't expect them too).
> As a result, these routes DON'T WORK...
> {code}
> <route>
>    <from uri="timer:foo?fixedRate=true&amp;period=10000" />
>    <setBody><constant>Hello Raul</constant></setBody>
>    <to uri="log:SendingRequest?showAll=true" />
>    <inOut uri="activemq:queue:test1?requestTimeout=1000" />
>    <to uri="log:ReceivedReply?showAll=true" />
> </route>
>         
> <route>
>    <from uri="activemq:queue:test1" />
>    <to uri="log:ReceivedRequest?showAll=true" />
> </route>
> {code}
> ... but just by adding an additional log endpoint to the second route (or any other thing, for that matter), it starts to work because Camel weaves in the Pipeline processor.
> Other workarounds that work:
> * -explicitly wrapping the log endpoint in a <pipeline> DSL-
> * <setBody><simple>${in.body}</simple></setBody>
> Or simply introducing anything that will force Camel to insert a Pipeline processor.
> IMHO, there are two solutions to avoid this issue:
> # Always weave in a Pipeline processor (adds overhead in simple routes and may cause regressions)
> # Adapt EndpointMessageListener to pick the IN message when the exchange is out capable and expectation of a reply exists
> I'm happy to work on a patch for Camel 2.10.1.
> *EDIT:* Just wrapping the single endpoint in <pipeline /> doesn't function as a workaround.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Resolved] (CAMEL-5464) camel-jms consumer doesn't send back a reply in all cases

Posted by "Willem Jiang (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-5464?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Willem Jiang resolved CAMEL-5464.
---------------------------------

       Resolution: Fixed
    Fix Version/s: 2.11.0

Applied the patch into trunk, as it breaks the behavior of old Camel version, I don't want to port it back to other branches.
                
> camel-jms consumer doesn't send back a reply in all cases
> ---------------------------------------------------------
>
>                 Key: CAMEL-5464
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5464
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-activemq, camel-jms
>    Affects Versions: 2.8.6, 2.9.2, 2.10.0
>            Reporter: Raul Kripalani
>            Assignee: Willem Jiang
>             Fix For: 2.11.0
>
>         Attachments: CAMEL-5464.patch
>
>
> In a very simple route consuming from a Camel JMS endpoint receiving InOut exchanges (i.e. JMSReplyTo header present), the endpoint will not send back replies.
> This happens because Camel JMS only returns a reply if the OUT message is set. But if the route looks like: consumer => processor, and Camel doesn't find the need to "weave in" an implicit Pipeline processor, no one will implicitly take care of mapping the IN message to an OUT message (unless the user knows about these internal aspects - but we shouldn't expect them too).
> As a result, these routes DON'T WORK...
> {code}
> <route>
>    <from uri="timer:foo?fixedRate=true&amp;period=10000" />
>    <setBody><constant>Hello Raul</constant></setBody>
>    <to uri="log:SendingRequest?showAll=true" />
>    <inOut uri="activemq:queue:test1?requestTimeout=1000" />
>    <to uri="log:ReceivedReply?showAll=true" />
> </route>
>         
> <route>
>    <from uri="activemq:queue:test1" />
>    <to uri="log:ReceivedRequest?showAll=true" />
> </route>
> {code}
> ... but just by adding an additional log endpoint to the second route (or any other thing, for that matter), it starts to work because Camel weaves in the Pipeline processor.
> Other workarounds that work:
> * -explicitly wrapping the log endpoint in a <pipeline> DSL-
> * <setBody><simple>${in.body}</simple></setBody>
> Or simply introducing anything that will force Camel to insert a Pipeline processor.
> IMHO, there are two solutions to avoid this issue:
> # Always weave in a Pipeline processor (adds overhead in simple routes and may cause regressions)
> # Adapt EndpointMessageListener to pick the IN message when the exchange is out capable and expectation of a reply exists
> I'm happy to work on a patch for Camel 2.10.1.
> *EDIT:* Just wrapping the single endpoint in <pipeline /> doesn't function as a workaround.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Reopened] (CAMEL-5464) camel-jms consumer doesn't send back a reply in all cases

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-5464?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen reopened CAMEL-5464:
--------------------------------

    
> camel-jms consumer doesn't send back a reply in all cases
> ---------------------------------------------------------
>
>                 Key: CAMEL-5464
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5464
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-activemq, camel-jms
>    Affects Versions: 2.8.6, 2.9.2, 2.10.0
>            Reporter: Raul Kripalani
>            Assignee: Willem Jiang
>             Fix For: 2.9.5, 2.10.3, 2.11.0
>
>         Attachments: CAMEL-5464.patch
>
>
> In a very simple route consuming from a Camel JMS endpoint receiving InOut exchanges (i.e. JMSReplyTo header present), the endpoint will not send back replies.
> This happens because Camel JMS only returns a reply if the OUT message is set. But if the route looks like: consumer => processor, and Camel doesn't find the need to "weave in" an implicit Pipeline processor, no one will implicitly take care of mapping the IN message to an OUT message (unless the user knows about these internal aspects - but we shouldn't expect them too).
> As a result, these routes DON'T WORK...
> {code}
> <route>
>    <from uri="timer:foo?fixedRate=true&amp;period=10000" />
>    <setBody><constant>Hello Raul</constant></setBody>
>    <to uri="log:SendingRequest?showAll=true" />
>    <inOut uri="activemq:queue:test1?requestTimeout=1000" />
>    <to uri="log:ReceivedReply?showAll=true" />
> </route>
>         
> <route>
>    <from uri="activemq:queue:test1" />
>    <to uri="log:ReceivedRequest?showAll=true" />
> </route>
> {code}
> ... but just by adding an additional log endpoint to the second route (or any other thing, for that matter), it starts to work because Camel weaves in the Pipeline processor.
> Other workarounds that work:
> * -explicitly wrapping the log endpoint in a <pipeline> DSL-
> * <setBody><simple>${in.body}</simple></setBody>
> Or simply introducing anything that will force Camel to insert a Pipeline processor.
> IMHO, there are two solutions to avoid this issue:
> # Always weave in a Pipeline processor (adds overhead in simple routes and may cause regressions)
> # Adapt EndpointMessageListener to pick the IN message when the exchange is out capable and expectation of a reply exists
> I'm happy to work on a patch for Camel 2.10.1.
> *EDIT:* Just wrapping the single endpoint in <pipeline /> doesn't function as a workaround.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Assigned] (CAMEL-5464) camel-jms consumer doesn't send back a reply in all cases

Posted by "Willem Jiang (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-5464?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Willem Jiang reassigned CAMEL-5464:
-----------------------------------

    Assignee: Willem Jiang
    
> camel-jms consumer doesn't send back a reply in all cases
> ---------------------------------------------------------
>
>                 Key: CAMEL-5464
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5464
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-activemq, camel-jms
>    Affects Versions: 2.8.6, 2.9.2, 2.10.0
>            Reporter: Raul Kripalani
>            Assignee: Willem Jiang
>         Attachments: CAMEL-5464.patch
>
>
> In a very simple route consuming from a Camel JMS endpoint receiving InOut exchanges (i.e. JMSReplyTo header present), the endpoint will not send back replies.
> This happens because Camel JMS only returns a reply if the OUT message is set. But if the route looks like: consumer => processor, and Camel doesn't find the need to "weave in" an implicit Pipeline processor, no one will implicitly take care of mapping the IN message to an OUT message (unless the user knows about these internal aspects - but we shouldn't expect them too).
> As a result, these routes DON'T WORK...
> {code}
> <route>
>    <from uri="timer:foo?fixedRate=true&amp;period=10000" />
>    <setBody><constant>Hello Raul</constant></setBody>
>    <to uri="log:SendingRequest?showAll=true" />
>    <inOut uri="activemq:queue:test1?requestTimeout=1000" />
>    <to uri="log:ReceivedReply?showAll=true" />
> </route>
>         
> <route>
>    <from uri="activemq:queue:test1" />
>    <to uri="log:ReceivedRequest?showAll=true" />
> </route>
> {code}
> ... but just by adding an additional log endpoint to the second route (or any other thing, for that matter), it starts to work because Camel weaves in the Pipeline processor.
> Other workarounds that work:
> * -explicitly wrapping the log endpoint in a <pipeline> DSL-
> * <setBody><simple>${in.body}</simple></setBody>
> Or simply introducing anything that will force Camel to insert a Pipeline processor.
> IMHO, there are two solutions to avoid this issue:
> # Always weave in a Pipeline processor (adds overhead in simple routes and may cause regressions)
> # Adapt EndpointMessageListener to pick the IN message when the exchange is out capable and expectation of a reply exists
> I'm happy to work on a patch for Camel 2.10.1.
> *EDIT:* Just wrapping the single endpoint in <pipeline /> doesn't function as a workaround.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (CAMEL-5464) camel-jms consumer doesn't send back a reply in all cases

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-5464?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen updated CAMEL-5464:
-------------------------------

    Fix Version/s: 2.10.3
                   2.9.5
    
> camel-jms consumer doesn't send back a reply in all cases
> ---------------------------------------------------------
>
>                 Key: CAMEL-5464
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5464
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-activemq, camel-jms
>    Affects Versions: 2.8.6, 2.9.2, 2.10.0
>            Reporter: Raul Kripalani
>            Assignee: Willem Jiang
>             Fix For: 2.9.5, 2.10.3, 2.11.0
>
>         Attachments: CAMEL-5464.patch
>
>
> In a very simple route consuming from a Camel JMS endpoint receiving InOut exchanges (i.e. JMSReplyTo header present), the endpoint will not send back replies.
> This happens because Camel JMS only returns a reply if the OUT message is set. But if the route looks like: consumer => processor, and Camel doesn't find the need to "weave in" an implicit Pipeline processor, no one will implicitly take care of mapping the IN message to an OUT message (unless the user knows about these internal aspects - but we shouldn't expect them too).
> As a result, these routes DON'T WORK...
> {code}
> <route>
>    <from uri="timer:foo?fixedRate=true&amp;period=10000" />
>    <setBody><constant>Hello Raul</constant></setBody>
>    <to uri="log:SendingRequest?showAll=true" />
>    <inOut uri="activemq:queue:test1?requestTimeout=1000" />
>    <to uri="log:ReceivedReply?showAll=true" />
> </route>
>         
> <route>
>    <from uri="activemq:queue:test1" />
>    <to uri="log:ReceivedRequest?showAll=true" />
> </route>
> {code}
> ... but just by adding an additional log endpoint to the second route (or any other thing, for that matter), it starts to work because Camel weaves in the Pipeline processor.
> Other workarounds that work:
> * -explicitly wrapping the log endpoint in a <pipeline> DSL-
> * <setBody><simple>${in.body}</simple></setBody>
> Or simply introducing anything that will force Camel to insert a Pipeline processor.
> IMHO, there are two solutions to avoid this issue:
> # Always weave in a Pipeline processor (adds overhead in simple routes and may cause regressions)
> # Adapt EndpointMessageListener to pick the IN message when the exchange is out capable and expectation of a reply exists
> I'm happy to work on a patch for Camel 2.10.1.
> *EDIT:* Just wrapping the single endpoint in <pipeline /> doesn't function as a workaround.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CAMEL-5464) camel-jms consumer doesn't send back a reply in all cases

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-5464?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13433072#comment-13433072 ] 

Claus Ibsen commented on CAMEL-5464:
------------------------------------

Yes #2 should be the case, as that is how the other components would have to do, eg cxf consumer etc.


                
> camel-jms consumer doesn't send back a reply in all cases
> ---------------------------------------------------------
>
>                 Key: CAMEL-5464
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5464
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-activemq, camel-jms
>    Affects Versions: 2.8.6, 2.9.2, 2.10.0
>            Reporter: Raul Kripalani
>             Fix For: 2.10.1
>
>
> In a very simple route consuming from a Camel JMS endpoint receiving InOut exchanges (i.e. JMSReplyTo header present), the endpoint will not send back replies.
> This happens because Camel JMS only returns a reply if the OUT message is set. But if the route looks like: consumer => processor, and Camel doesn't find the need to "weave in" an implicit Pipeline processor, no one will implicitly take care of mapping the IN message to an OUT message (unless the user knows about these internal aspects - but we shouldn't expect them too).
> As a result, these routes DON'T WORK...
> {code}
> <route>
>    <from uri="timer:foo?fixedRate=true&amp;period=10000" />
>    <setBody><constant>Hello Raul</constant></setBody>
>    <to uri="log:SendingRequest?showAll=true" />
>    <inOut uri="activemq:queue:test1?requestTimeout=1000" />
>    <to uri="log:ReceivedReply?showAll=true" />
> </route>
>         
> <route>
>    <from uri="activemq:queue:test1" />
>    <to uri="log:ReceivedRequest?showAll=true" />
> </route>
> {code}
> ... but just by adding an additional log endpoint to the second route (or any other thing, for that matter), it starts to work because Camel weaves in the Pipeline processor.
> Other workarounds that work:
> * -explicitly wrapping the log endpoint in a <pipeline> DSL-
> * <setBody><simple>${in.body}</simple></setBody>
> Or simply introducing anything that will force Camel to insert a Pipeline processor.
> IMHO, there are two solutions to avoid this issue:
> # Always weave in a Pipeline processor (adds overhead in simple routes and may cause regressions)
> # Adapt EndpointMessageListener to pick the IN message when the exchange is out capable and expectation of a reply exists
> I'm happy to work on a patch for Camel 2.10.1.
> *EDIT:* Just wrapping the single endpoint in <pipeline /> doesn't function as a workaround.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (CAMEL-5464) camel-jms consumer doesn't send back a reply in all cases

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-5464?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen resolved CAMEL-5464.
--------------------------------

    Resolution: Fixed

Backported to 2.10 and 2.9 branches.
                
> camel-jms consumer doesn't send back a reply in all cases
> ---------------------------------------------------------
>
>                 Key: CAMEL-5464
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5464
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-activemq, camel-jms
>    Affects Versions: 2.8.6, 2.9.2, 2.10.0
>            Reporter: Raul Kripalani
>            Assignee: Willem Jiang
>             Fix For: 2.9.5, 2.10.3, 2.11.0
>
>         Attachments: CAMEL-5464.patch
>
>
> In a very simple route consuming from a Camel JMS endpoint receiving InOut exchanges (i.e. JMSReplyTo header present), the endpoint will not send back replies.
> This happens because Camel JMS only returns a reply if the OUT message is set. But if the route looks like: consumer => processor, and Camel doesn't find the need to "weave in" an implicit Pipeline processor, no one will implicitly take care of mapping the IN message to an OUT message (unless the user knows about these internal aspects - but we shouldn't expect them too).
> As a result, these routes DON'T WORK...
> {code}
> <route>
>    <from uri="timer:foo?fixedRate=true&amp;period=10000" />
>    <setBody><constant>Hello Raul</constant></setBody>
>    <to uri="log:SendingRequest?showAll=true" />
>    <inOut uri="activemq:queue:test1?requestTimeout=1000" />
>    <to uri="log:ReceivedReply?showAll=true" />
> </route>
>         
> <route>
>    <from uri="activemq:queue:test1" />
>    <to uri="log:ReceivedRequest?showAll=true" />
> </route>
> {code}
> ... but just by adding an additional log endpoint to the second route (or any other thing, for that matter), it starts to work because Camel weaves in the Pipeline processor.
> Other workarounds that work:
> * -explicitly wrapping the log endpoint in a <pipeline> DSL-
> * <setBody><simple>${in.body}</simple></setBody>
> Or simply introducing anything that will force Camel to insert a Pipeline processor.
> IMHO, there are two solutions to avoid this issue:
> # Always weave in a Pipeline processor (adds overhead in simple routes and may cause regressions)
> # Adapt EndpointMessageListener to pick the IN message when the exchange is out capable and expectation of a reply exists
> I'm happy to work on a patch for Camel 2.10.1.
> *EDIT:* Just wrapping the single endpoint in <pipeline /> doesn't function as a workaround.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira