From activemq-users-return-4154-apmail-geronimo-activemq-users-archive=geronimo.apache.org@geronimo.apache.org Tue Aug 29 16:43:25 2006 Return-Path: Delivered-To: apmail-geronimo-activemq-users-archive@www.apache.org Received: (qmail 84966 invoked from network); 29 Aug 2006 16:43:25 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 29 Aug 2006 16:43:25 -0000 Received: (qmail 32424 invoked by uid 500); 29 Aug 2006 16:43:25 -0000 Delivered-To: apmail-geronimo-activemq-users-archive@geronimo.apache.org Received: (qmail 32237 invoked by uid 500); 29 Aug 2006 16:43:24 -0000 Mailing-List: contact activemq-users-help@geronimo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: activemq-users@geronimo.apache.org Delivered-To: mailing list activemq-users@geronimo.apache.org Received: (qmail 32228 invoked by uid 99); 29 Aug 2006 16:43:24 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Aug 2006 09:43:24 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [64.14.253.182] (HELO mail.exist.com) (64.14.253.182) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Aug 2006 09:43:23 -0700 Received: from [192.168.1.34] (124.106.134.240.pldt.net [124.106.134.240] (may be forged)) (authenticated bits=0) by mail.exist.com (8.12.11/8.12.11) with ESMTP id k7TGeiP8011927 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 29 Aug 2006 09:40:47 -0700 Message-ID: <44F46E8E.7050908@exist.com> Date: Wed, 30 Aug 2006 00:42:54 +0800 From: Adrian Co User-Agent: Thunderbird 1.5.0.5 (Windows/20060719) MIME-Version: 1.0 To: activemq-users@geronimo.apache.org Subject: Re: Messages send via JMX are deliverd, but the other ones not... References: <6042456.post@talk.nabble.com> In-Reply-To: <6042456.post@talk.nabble.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hi, Could you attach your client code, so we could test it and see? (producer and consumer) :) Markus Joschko wrote: > Hi, > I think I made a stupid mistake but I can't find it. I simply try to send > and receive a message from a topic. The problem is that if I try to send a > message from the code, it is never delivered to the clients (which are using > MessageAvailableListeners and operate on one connection). However I can see > in the JMX console, that there are two subscriptions on the topic "test". > Furthermore I see the attribute enqueuecount on the test topic increasing > when I send a message from the java code. On the Operations tab of the test > topic I can press the browseAsTable button I can see a number of JMS > messages which match the one I sent (at least the priority and the > timestamp). However fields like JMSType and properties are empty??? > > Doing a further test in the JMX console by sending a textmessage from it > triggers the clients. The messages are received correctly. > Hm, I have no clue what's going wrong. The code that sends the message: > > Destination destination = session.createTopic(channel); > TextMessage message = this.session.createTextMessage(text); > MessageProducer producer = this.session.createProducer(null); > > producer.setDeliveryMode(DeliveryMode.NON_PERSISTENT); > producer.setDisableMessageID(false); > producer.setPriority(1); > producer.send(destination, message); > producer.close(); > > I wonder if it is correct to create the topic again to send a message. > However if I store the destination and reuse it, it doesn't work either. > > Another thing that I can see in the JMX console and that makes me wonder is > that there are multiple topics: > > test > ActiveMQ.Advisory.Consumer.Topic.test > > as soon as I send a message via the JMX console a further topic is created > > ActiveMQ.Advisory.Producer.Topic.test > > This does not happen if I try to send the message from the java code. Seems > that I don't understand how to correctly create a topic for a > messageproducer ..... > > Thanks for reading, > Markus > >