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

Devendra Khanolkar updated CAMEL-5832:
--------------------------------------

    Attachment: JmsReplyToComponentEndlessLoopTest.java
                EndpointMessageListener.java
                JmsConfiguration.java

G'day Claus,

Please find the attached @EndpointMessageListener and @JmsConfiguration classes.
My thinking is, we catch the trap set by the message sender (i.e. if the sender 
is trying to send us a msg and asking the JmsConsumer to reply back to the same 
queue, effectively creating an endless loop) at runtime. I couldnt find a way 
to determine this condition at route creation time, so had to put a check 
within the onMessage() method.
Please ignore the old test that I attached at 14th of June. Attached is a new 
test which can help create a short lived endless loop.

Let me know your thoughts.

Thanks
-Dev
                
> camel-jms - JMS consumer should detect JMSReplyTo being sending to itself to 
> avoid circular looping
> ---------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-5832
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5832
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-jms
>    Affects Versions: 2.10.2
>            Reporter: Claus Ibsen
>            Priority: Minor
>             Fix For: Future
>
>         Attachments: EndpointMessageListener.java, JmsConfiguration.java, 
> JmsReplyToComponentEndlessLoopTest.java, 
> JmsReplyToComponentEndlessLoopTest.java
>
>
> If people do something stupid to send a message to a queue which has a 
> JMSReplyTo that goes back to the same queue, then that message would go in 
> looping (endless).
> We should maybe add some check for this, and add some option people can turn 
> on|off this check. And if the check is enabled it would detect this and not 
> send back a reply to itself.
> There may be some odd use-cases where people send back reply messages to the 
> same queue. And maybe have some dynamic router logic that can break the chain 
> when done.

--
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

Reply via email to