Return-Path: X-Original-To: apmail-activemq-dev-archive@www.apache.org Delivered-To: apmail-activemq-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 682CD10DD8 for ; Mon, 22 Jul 2013 13:22:50 +0000 (UTC) Received: (qmail 11056 invoked by uid 500); 22 Jul 2013 13:22:50 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 10965 invoked by uid 500); 22 Jul 2013 13:22:49 -0000 Mailing-List: contact dev-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list dev@activemq.apache.org Received: (qmail 10939 invoked by uid 99); 22 Jul 2013 13:22:49 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 Jul 2013 13:22:49 +0000 Date: Mon, 22 Jul 2013 13:22:49 +0000 (UTC) From: "Thomas Krammer (JIRA)" To: dev@activemq.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (AMQCPP-502) Can't send to temporary queues created by name MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/AMQCPP-502?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Thomas Krammer updated AMQCPP-502: ---------------------------------- Attachment: activemq.patch Added patch with my changes. It probably won't apply to the current version since I use a pretty old version of the library. But from the code it seems the bug is still present in the current version. > Can't send to temporary queues created by name > ---------------------------------------------- > > Key: AMQCPP-502 > URL: https://issues.apache.org/jira/browse/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 > 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 blockMessage(session->createBytesMessage()); > blockMessage->writeBytes(reinterpret_cast(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: http://www.atlassian.com/software/jira