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 20BD91085B for ; Tue, 23 Jul 2013 16:08:50 +0000 (UTC) Received: (qmail 7888 invoked by uid 500); 23 Jul 2013 16:08:49 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 7792 invoked by uid 500); 23 Jul 2013 16:08:48 -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 7754 invoked by uid 99); 23 Jul 2013 16:08:48 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Jul 2013 16:08:48 +0000 Date: Tue, 23 Jul 2013 16:08:48 +0000 (UTC) From: "Timothy Bish (JIRA)" To: dev@activemq.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Resolved] (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 ] Timothy Bish resolved AMQCPP-502. --------------------------------- Resolution: Fixed Fix Version/s: 3.8.0 Fixed on trunk > 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: New Feature > Components: CMS Impl > Affects Versions: 3.4.0 > Environment: Windows Vista, Visual Studio 2005 > Reporter: Thomas Krammer > Assignee: Timothy Bish > Priority: Minor > Fix For: 3.8.0 > > 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