activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Timothy Bish (JIRA)" <>
Subject [jira] [Commented] (AMQCPP-482) Message.getCMSMessageID() returns an empty string after send
Date Thu, 09 May 2013 16:11:17 GMT


Timothy Bish commented on AMQCPP-482:

you can also attach a patch if you already have a fix in hand as well, those are also appreciated.

> Message.getCMSMessageID() returns an empty string after send
> ------------------------------------------------------------
>                 Key: AMQCPP-482
>                 URL:
>             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
> 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:

View raw message