activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jonathan Fortier (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AMQCPP-482) Message.getCMSMessageID() returns an empty string after send
Date Tue, 21 May 2013 16:03:15 GMT

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

Jonathan Fortier commented on AMQCPP-482:
-----------------------------------------

Sorry for the delay in my response. You were so quick in resolving this issue that I didn't
have enough time to send a patch :)
Just to do a little follow-up, I applied the modifications to my setup, and the messages now
seem to have the correct MessageID after send.
Thanks for the fix!
                
> Message.getCMSMessageID() returns an empty string after send
> ------------------------------------------------------------
>
>                 Key: AMQCPP-482
>                 URL: https://issues.apache.org/jira/browse/AMQCPP-482
>             Project: ActiveMQ C++ Client
>          Issue Type: Bug
>          Components: CMS Impl
>    Affects Versions: 3.6.0
>         Environment: Windows 7 service pack 1, ActiveMQ broker 5.8.0, apr 1.4.6, apr-util
1.5.1, apr-iconv 1.2.1
>            Reporter: Jonathan Fortier
>            Assignee: Timothy Bish
>             Fix For: 3.7.0
>
>
> The JMS specification states the following:
> "When a message is sent, JMSMessageID is ignored. When the send method
> returns it contains a provider-assigned value."
> However, when I use ActiveMQ-cpp to send a message, it returns an empty CMSMessageID
after the send operation completes.
> Looking a little deeper for the problem, I saw that in ActiveMQSessionKernel::send(...),
if the message doesn't need transformation, we clone the message before sending it. However,
the message ID is set on the clone rather than on the original message, which could explain
why the original message stays with an empty CMSMessageID.
> To reproduce the bug, I used the "example" application that comes with ActiveMQ-CPP,
and I added the following line in HelloWorldProducer::run(), after sending the message:
>   printf("Sent message with ID: '%s'\n", message->getCMSMessageID().c_str());
> This always print an empty ID.
> I wanted to retrieve this ID to later match a response to a request sent by ActiveMQ-cpp,
and I didn't find any workaround to retrieve this ID by other means...

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

Mime
View raw message