activemq-dev mailing list archives

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

             Summary: Can't send to temporary queues created by name
                 Key: AMQCPP-502
             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

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

  while(fillBuffer()) {
    std::auto_ptr<cms::BytesMessage> blockMessage(session->createBytesMessage());
    blockMessage->writeBytes(reinterpret_cast<unsigned char *>(buffer), 0, bc);

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