Return-Path: Delivered-To: apmail-activemq-users-archive@www.apache.org Received: (qmail 48974 invoked from network); 30 Apr 2007 21:44:42 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 30 Apr 2007 21:44:42 -0000 Received: (qmail 26174 invoked by uid 500); 30 Apr 2007 21:44:48 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 26159 invoked by uid 500); 30 Apr 2007 21:44:48 -0000 Mailing-List: contact users-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@activemq.apache.org Delivered-To: mailing list users@activemq.apache.org Received: (qmail 26150 invoked by uid 99); 30 Apr 2007 21:44:48 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 Apr 2007 14:44:48 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of dbudworth@gmail.com designates 209.85.132.243 as permitted sender) Received: from [209.85.132.243] (HELO an-out-0708.google.com) (209.85.132.243) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 Apr 2007 14:44:40 -0700 Received: by an-out-0708.google.com with SMTP id b38so1418394ana for ; Mon, 30 Apr 2007 14:44:20 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=fzpAImVqDwzYXTcLgFNFs/Q7ZFL39ceopfCEOL4LwN47UuPJB8VUdYWY5pQdaszGqxwoHvDjOEW1GR1BHjN263qWEIStiDAfv07v7xJ11YV/R9vR/5X37eoGd43mUrxU14AYB8blk3DjL5N/pgvN/PkWda32i8rk6k60MWX4zqc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=Cl/MsaLW7Ey7N9ScoqmyWr2qufx5BTGCq4nzhW4cxwVthadPLk6v5cjymstIvLeqV9n7tMifmKjD/bSzcD6k7LUZUmXxDh23ZxMK4OMjuZAfvER+QHvCeJ7/o3YL17N6rjleZhIQHxsfFjb/NcHNCKeoxywhzUpcbpVDZpxWtL4= Received: by 10.100.167.7 with SMTP id p7mr1979939ane.1177969459590; Mon, 30 Apr 2007 14:44:19 -0700 (PDT) Received: by 10.100.48.6 with HTTP; Mon, 30 Apr 2007 14:44:19 -0700 (PDT) Message-ID: <2e23d1d20704301444o47fb92c2uff05dd9ed102aef4@mail.gmail.com> Date: Mon, 30 Apr 2007 16:44:19 -0500 From: "David Budworth" To: users@activemq.apache.org Subject: Re: Problem with Temporary Queues In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_18302_23134784.1177969459525" References: <20070424132315.GG12755@thegestalt.org> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_18302_23134784.1177969459525 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline the connection that is doing tmp.receive(timeout) was started? ( ie: connection.start() ) If a connection is not started it can send but not receive a message. may not be it, but that gets me reasonably often when ever I change connection creation schemes On 4/24/07, James Strachan wrote: > > Your code looks fine so not sure the issue. The server side isn't > using transacted mode or anything? > > BTW this might be useful... > > http://cwiki.apache.org/ACTIVEMQ/how-do-i-send-messages-to-different-destinations-from-a-single-messageproducer.html > > On 4/24/07, Simon Wistow wrote: > > > > I seem to have run into some problems with my code and I'm trying to > > track down if it's a regression in my code or a change in ActiveMQ that > > I didn't notice. > > > > I'm attempting to send a message to a temporary queue and then wait for > > a reply using something like > > > > > > Destination destination; > > QueueSession session; > > QueueConnection connection; > > QueueSender sender; > > ActiveMQConnectionFactory connectionFactory; > > > > connectionFactory = new ActiveMQConnectionFactory(user, pwd, url); > > session = connection.createSession(false, ack_mode); > > connection = connectionFactory.createQueueConnection(); > > destination = session.createQueue(subject); > > publisher = session.createSender(destination); > > > > Queue tmp_queue = session.createTemporaryQueue(); > > QueueReceiver tmp = session.createReceiver(tmp_queue); > > > > Message message = createNewMessage(); > > > > message.setJMSReplyTo(queue); > > sender.send(message); > > > > Message tmp_mess = (Message) tmp.receive(timeout); > > > > > > The Queue at the other end recieves the message fine and replies using > > what appears to be the right queue ID > > > > > > Message reply = createMessage(); > > > > reply.setJMSCorrelationID(subject); > > > > Queue reply_queue = (Queue) original_message.getJMSReplyTo(); > > QueueSender sender = session.createSender(reply_queue); > > sender.send(reply); > > > > > > However tmp.receive(timeout) never gets a message back, it only ever > > times out. Changing the methods to use Topic in place of Queue works > > absolutely fine. > > > > I'm pretty sure this code used work - I'm just about to start bisecting > > every change however I've also upgraded ActiveMQ from 0.99 to 4.11 so I > > wondered if that might have been the cause. > > > > Any ideas? > > > > thanks, > > Simon > > > > > -- > James > ------- > http://macstrac.blogspot.com/ > ------=_Part_18302_23134784.1177969459525--