[
https://issues.apache.org/jira/browse/AMQCPP-482?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Timothy Bish resolved AMQCPP-482.
---------------------------------
Resolution: Fixed
Fix Version/s: 3.7.0
Fixed and test added on trunk.
> 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