You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2015/07/30 01:57:04 UTC

[jira] [Commented] (AMQ-5903) Message headers are lost when using the Broker Component for Camel

    [ https://issues.apache.org/jira/browse/AMQ-5903?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14646936#comment-14646936 ] 

ASF GitHub Bot commented on AMQ-5903:
-------------------------------------

GitHub user heathkesler opened a pull request:

    https://github.com/apache/activemq/pull/137

    AMQ-5903 - add patch that fixes the broker camel component 

    AMQ-5903 - add patch that fixes the broker camel component to take all header values

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/savoirtech/activemq trunk

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/activemq/pull/137.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #137
    
----
commit 8f407a78dc5ed868c1b59ccb68f489c8ceae875f
Author: Heath Kesler <he...@gmail.com>
Date:   2015-07-29T23:48:16Z

    AMQ-5903 - add patch that fixes the broker camel component to take all header values

----


> Message headers are lost when using the Broker Component for Camel
> ------------------------------------------------------------------
>
>                 Key: AMQ-5903
>                 URL: https://issues.apache.org/jira/browse/AMQ-5903
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: activemq-camel
>    Affects Versions: 5.11.1
>            Reporter: Heath Kesler
>         Attachments: amq-5903.patch
>
>
> When using the broker camel component as defined here:  http://activemq.apache.org/broker-camel-component.html
> There appears to be an undocumented limitation of the broker component's current implementation. I need to know whether said limitation is by design or an oversight. If it's an oversight then I can submit a patch for it.
> This example route does not work as expected - the JMSXGroupID header is lost when received by the broker component.
> <route> 
> <from uri="broker:queue:test"/> 
> <setHeader headerName="JMSXGroupID"> 
> <constant>123</constant> 
> </setHeader> 
> <to uri="broker:queue:test"/> 
> </route>
> After single stepping with a debugger the component executes this code: https://github.com/apache/activemq/blob/master/activemq-camel/src/main/java/org/apache/activemq/camel/component/broker/BrokerProducer.java#L102
> As you can see from the method's implementation it only copies over a fixed set of six well-known headers. All other headers on the inbound message are discarded. Why not copy over every header? Consequently the JMSXGroupID header is not copied, despite being present on the inbound message.
> This would appear to be a bug in my opinion as I do not believe we should be loosing any headers on a message in this case.  



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)