Return-Path: Delivered-To: apmail-activemq-users-archive@www.apache.org Received: (qmail 11940 invoked from network); 17 Oct 2008 07:37:02 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 17 Oct 2008 07:37:02 -0000 Received: (qmail 9977 invoked by uid 500); 17 Oct 2008 07:37:02 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 9961 invoked by uid 500); 17 Oct 2008 07:37:02 -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 9950 invoked by uid 99); 17 Oct 2008 07:37:02 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 17 Oct 2008 00:37:02 -0700 X-ASF-Spam-Status: No, hits=0.2 required=10.0 tests=SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of james.strachan@gmail.com designates 209.85.217.15 as permitted sender) Received: from [209.85.217.15] (HELO mail-gx0-f15.google.com) (209.85.217.15) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 17 Oct 2008 07:35:52 +0000 Received: by gxk8 with SMTP id 8so693202gxk.14 for ; Fri, 17 Oct 2008 00:36:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=7jxbbQjUyfgfnRHdvEH1Nlx49dTTcbSKrl9Wi5dAjG4=; b=Loq9V7sTa6ChGRJFI/aCycD17sJhfxosMYqUfNYAFF/qH6edlBbi35NDHdMQA2uhFu 034NhwtMDnN8+SLPelOnqbtnLoYpr8MJ4trj38pFMCDeJ0OmXJbzreK8dSaZUX9/AsXl kaVWbt3Ae/zWFnDq8b7OD33NFnPmGqLxExu50= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=hcdpSR5ShzRMVzG15gTl37fqleAZqudcCr9cCB5BgiwcMTmL1fSUPjnR3YemxWD8Vs GzSpA3EYdsmjMnJ349kJx5rwL8O2kyVimYVLwzOaMJGW2b0F1HziFi8vean9ekNKMK4u VAjaeyxkwQZfz9nah497m/ryD87tgtzHYIPbA= Received: by 10.90.99.3 with SMTP id w3mr4214761agb.111.1224228988961; Fri, 17 Oct 2008 00:36:28 -0700 (PDT) Received: by 10.90.117.12 with HTTP; Fri, 17 Oct 2008 00:36:28 -0700 (PDT) Message-ID: Date: Fri, 17 Oct 2008 08:36:28 +0100 From: "James Strachan" To: users@activemq.apache.org Subject: Re: Spring-JMS and reading messages from existing destinations in ActiveMQ In-Reply-To: <20024181.post@talk.nabble.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20024181.post@talk.nabble.com> X-Virus-Checked: Checked by ClamAV on apache.org Where does the destination come from? Its not a temporary destination right? Its not this issue is it? http://activemq.apache.org/i-do-not-receive-messages-in-my-second-consumer.html 2008/10/17 rajpreet : > > So I am doing this in my code to start a consumer, I use JmsTemplate to > create connectionFactory, then create a connection, do a start , obtain a > session , then create a consumer and set the Message Listener. > > So far so good, I am using Active MQ as the JMS provider, now if I use bring > up my consumer for a destination(it's a queue) that is not created in > ActiveMQ , everything works fine. My consumer picks up the messages to sent > to the destination. > > But the problem happens, when a queue is already created, when I start my > consumer the consumer doesn't listen to the queue and doesn't pick up > messages. Messages stay in the pending state. Is there a config I should > change or am I doing something wrong while creating the consumer ? > > ---------------------------------------------------------------- > > template.setSessionAcknowledgeMode(Session.CLIENT_ ACKNOWLEDGE); > ConnectionFactory factory = template.getConnectionFactory(); > connection = factory.createConnection(); > > connection.start(); > > session = connection.createSession(false, > Session.CLIENT_ACKNOWLEDGE); > > consumer = session.createConsumer(destination); > consumer.setMessageListener(this);[/html] > -- > View this message in context: http://www.nabble.com/Spring-JMS-and-reading-messages-from-existing-destinations-in-ActiveMQ-tp20024181p20024181.html > Sent from the ActiveMQ - User mailing list archive at Nabble.com. > -- James ------- http://macstrac.blogspot.com/ Open Source Integration http://fusesource.com/