activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Timothy Bish (JIRA)" <>
Subject [jira] [Commented] (AMQCPP-502) Can't send to temporary queues created by name
Date Mon, 22 Jul 2013 13:52:48 GMT


Timothy Bish commented on AMQCPP-502:

Best to create a test case and a patch against trunk if you want this included in a future
release, can't verify it since there's no test. 
> Can't send to temporary queues created by name
> ----------------------------------------------
>                 Key: AMQCPP-502
>                 URL:
>             Project: ActiveMQ C++ Client
>          Issue Type: Bug
>          Components: CMS Impl
>    Affects Versions: 3.4.0
>         Environment: Windows Vista, Visual Studio 2005
>            Reporter: Thomas Krammer
>            Assignee: Timothy Bish
>         Attachments: activemq.patch
> I have a Java process and a C++ process communicating using ActiveMQ. For some messages
the C++ process will produce big results which are sent in chunks in separate ByteMessages
(very similar to ActiveMQInput/OutputStream). To receive these chunks the Java process generates
a temporary queue and sends the name of the queue (result of getQueueName) to the C++ process.
The C++ process then sends the ByteMessages to this temporary queue using this code:
>   std::string targetQueue = // get queue name sent by Java
>   session = connection->createSession(cms::Session::AUTO_ACKNOWLEDGE);
>   queue = session->createQueue(targetQueue);
>   producer = session->createProducer(queue);
>   producer->setDeliveryMode(cms::DeliveryMode::PERSISTENT);
>   while(fillBuffer()) {
>     std::auto_ptr<cms::BytesMessage> blockMessage(session->createBytesMessage());
>     blockMessage->writeBytes(reinterpret_cast<unsigned char *>(buffer), 0, bc);
>     producer->send(blockMessage.get());
>   }
> On the Java side I never receive the messages sent by C++ but I don't get any error from
the C++ code either. When I change the Java code to create a regular queue instead of a temporary
queue the code works fine.
> I had a look at the Java implementation of ActiveMQSession::createQueue and found that
they have a special case handling for temporary queues that is missing from the C++ code.
After adding this special case to the C++ implementation the code above works fine.

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