Problem with sending a message from one JMS queue to another

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Problem with sending a message from one JMS queue to another

Bruce Elmore
I noticed a problem in JmsBinding.java. If Camel has read a JMS message from a queue and that message has a bean method specified in the header ("org.apache.camel.MethodName"), the method header will removed if that message is written to another queue. Here's the offending code:

    protected boolean shouldOutputHeader(org.apache.camel.Message camelMessage, String headerName,
                                         Object headerValue) {
        return headerValue != null && !getIgnoreJmsHeaders().contains(headerName)
               && ObjectHelper.isJavaIdentifier(headerName);
    }

"org.apache.camel.MethodName" fails the check isJavaIdentifier and is excluded from the headers written to the new message. I'm not sure the purpose of this check, but this might be an unintended side effect.

The call chain is something like this:

JmsProducer.process
JmsBinding.makeJmsMessage
JmsBinding.appendJmsProperties
JmsBinding.shouldOutputHeader

Reply | Threaded
Open this post in threaded view
|

RE: Problem with sending a message from one JMS queue to another

Claus Ibsen
Hi Bruce

Could you create a ticket in JIRA with this issue? So we do not forget to look into it.


Med venlig hilsen
 
Claus Ibsen
......................................
Silverbullet
Skovsgårdsvænget 21
8362 Hørning
Tlf. +45 2962 7576
Web: www.silverbullet.dk

-----Original Message-----
From: Bruce Elmore [mailto:[hidden email]]
Sent: 23. juni 2008 16:00
To: [hidden email]
Subject: Problem with sending a message from one JMS queue to another


I noticed a problem in JmsBinding.java. If Camel has read a JMS message from
a queue and that message has a bean method specified in the header
("org.apache.camel.MethodName"), the method header will removed if that
message is written to another queue. Here's the offending code:

    protected boolean shouldOutputHeader(org.apache.camel.Message
camelMessage, String headerName,
                                         Object headerValue) {
        return headerValue != null &&
!getIgnoreJmsHeaders().contains(headerName)
               && ObjectHelper.isJavaIdentifier(headerName);
    }

"org.apache.camel.MethodName" fails the check isJavaIdentifier and is
excluded from the headers written to the new message. I'm not sure the
purpose of this check, but this might be an unintended side effect.

The call chain is something like this:

JmsProducer.process
JmsBinding.makeJmsMessage
JmsBinding.appendJmsProperties
JmsBinding.shouldOutputHeader


--
View this message in context: http://www.nabble.com/Problem-with-sending-a-message-from-one-JMS-queue-to-another-tp18069875s22882p18069875.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply | Threaded
Open this post in threaded view
|

RE: Problem with sending a message from one JMS queue to another

Bruce Elmore
Thanks Claus,

I added to the issue list (CAMEL-653). Note that I also added some comments about Weblogic 9.2 (and perhaps other versions) not liking "org.apache.camel.MethodName" as a header name, since I'm guessing that its related to the issue.