From users-return-18584-apmail-activemq-users-archive=activemq.apache.org@activemq.apache.org Thu Apr 02 09:26:57 2009 Return-Path: Delivered-To: apmail-activemq-users-archive@www.apache.org Received: (qmail 62518 invoked from network); 2 Apr 2009 09:26:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 2 Apr 2009 09:26:57 -0000 Received: (qmail 54458 invoked by uid 500); 2 Apr 2009 09:26:56 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 54390 invoked by uid 500); 2 Apr 2009 09:26:56 -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 54380 invoked by uid 99); 2 Apr 2009 09:26:56 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Apr 2009 09:26:56 +0000 X-ASF-Spam-Status: No, hits=3.7 required=10.0 tests=HTML_MESSAGE,NORMAL_HTTP_TO_IP,SPF_PASS,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of sulong1984@gmail.com designates 74.125.46.156 as permitted sender) Received: from [74.125.46.156] (HELO yw-out-1718.google.com) (74.125.46.156) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Apr 2009 09:26:47 +0000 Received: by yw-out-1718.google.com with SMTP id 4so300288ywq.86 for ; Thu, 02 Apr 2009 02:26:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:date:received:message-id:subject :from:to:content-type; bh=Fu9PQyyTiRxBZdnkyT13DBQmTgZ+kRP8sqyZSeKJrPE=; b=csQFU2vJREUBNH6Iv/H5BxnF1dfYft+jqFx0Xbck7wFlp4k46nuJgoAZqSh/V4fyaN sVdY/HbFygccxGXe85nb8zdkV03A+r/pI8JAZWhpt7Tw1XF/hJL289/EH4ncnyIJDRyP gs4dDdGozhySr1STJmCDc+CR6K+H8/lb0dNWE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=qD4L5DPDNATlGQZs8wEPARtGDVgWaFOu0opjnMjrvszP4Rhy4OQ9mushfMU8CtftlT LQGQmNX600Lv14/vyZT9KMGTX6lqxRRIkosBr3SBRbGb73LD7dvdPHeuvnHNa929GLuw 8rmMNUamvTWcqSQJIGS0gM7zOuVanWr3sxn2s= MIME-Version: 1.0 Date: Thu, 2 Apr 2009 17:26:04 +0800 Received: by 10.100.189.8 with SMTP id m8mr6075960anf.90.1238664379365; Thu, 02 Apr 2009 02:26:19 -0700 (PDT) Message-ID: <4e0eb730904020226p21f5413bid9afd76c228fd7b@mail.gmail.com> Subject: client is blocked after sending 5082 messages From: sulong To: users@activemq.apache.org Content-Type: multipart/alternative; boundary=0016e644c76c55c7ec04668f06db X-Virus-Checked: Checked by ClamAV on apache.org --0016e644c76c55c7ec04668f06db Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi all,I am testing the activemq to learn how to use it. I write a simple single thread jms client to send 10000 messages, but it is blocked at the 5083rd message. I use: activemq 5.2 jvm 1.5 ubuntu 8.10 and the program is simple : public class Sender { public static void main(String[] args) { ConnectionFactory cf = new ActiveMQConnectionFactory("tcp:// 10.1.94.237:6000"); Connection conn = null; Session s = null; try { conn = cf.createConnection(); s = conn.createSession(false, Session.AUTO_ACKNOWLEDGE); s.run(); MessageProducer sender = s.createProducer(s.createQueue("jms_test")); for (int i = 0; i < 10000; i++) { TextMessage tm = s.createTextMessage(); tm.setText(String.valueOf(i)); sender.send(tm); } System.out.println("Done."); }catch (JMSException e) { e.printStackTrace(); } finally { if (conn != null) { try { conn.close(); } catch (Exception e) { e.printStackTrace(); } } if (s != null) { try { s.close(); } catch (Exception e) { e.printStackTrace(); } } } } } anyone knows why it is blocked? Thanks --0016e644c76c55c7ec04668f06db--