Return-Path: Delivered-To: apmail-activemq-dev-archive@www.apache.org Received: (qmail 3905 invoked from network); 13 Mar 2007 17:07:07 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 13 Mar 2007 17:07:07 -0000 Received: (qmail 49353 invoked by uid 500); 13 Mar 2007 17:07:05 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 49329 invoked by uid 500); 13 Mar 2007 17:07:05 -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 49311 invoked by uid 99); 13 Mar 2007 17:07:05 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Mar 2007 10:07:05 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Mar 2007 10:06:56 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 8DEE6714074 for ; Tue, 13 Mar 2007 10:06:35 -0700 (PDT) Message-ID: <13601648.1173805595576.JavaMail.jira@brutus> Date: Tue, 13 Mar 2007 10:06:35 -0700 (PDT) From: "james strachan (JIRA)" To: dev@activemq.apache.org Subject: [jira] Commented: (AMQ-1192) STOMP client cannot be stopped and disconnected without loosing messages In-Reply-To: <3826960.1173284841241.JavaMail.root@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/activemq/browse/AMQ-1192?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_38809 ] james strachan commented on AMQ-1192: ------------------------------------- Here's some background on prefetch (and how that affects message delivery)... http://activemq.apache.org/i-do-not-receive-messages-in-my-second-consumer.html > STOMP client cannot be stopped and disconnected without loosing messages > ------------------------------------------------------------------------ > > Key: AMQ-1192 > URL: https://issues.apache.org/activemq/browse/AMQ-1192 > Project: ActiveMQ > Issue Type: Bug > Affects Versions: 4.1.0 > Environment: C stomp client on AS3 linux > apache-activemq-4.1.0-incubator > apache APR 0.9.7 > Reporter: Joel Schaubert > Attachments: activemq_tester.c > > > I have added to the STOMP tester so it can take command line args for number of message to be read/sent. Using this the following tests will show the problems > #1) All messages are lost when a client does STOMP disconnect > 1.1 start a subscriber to read 5 messages > ./activemq_tester -d sub -m 5 > 1.2 start a publisher to publish 10 messages > ./activemq_tester -d pub -m 10 > 1.3 run subscriber again to get the remaining 5 messages > ./activemq_tester -d sub -m 5 > ---> No messages are available for the second run of the test subscriber. It seems there is no way to shutdown a stomp client without loosing all the messages on that q. > Output here. > -bash-2.05b$ ./activemq_tester -d pub -m 10 > Connecting......OK > Sending connect message.OK > Reading Response.Response: CONNECTED, > OK > Sending Message.Sending Message: This is message number 0 > Sending Message: This is message number 1 > Sending Message: This is message number 2 > Sending Message: This is message number 3 > Sending Message: This is message number 4 > Sending Message: This is message number 5 > Sending Message: This is message number 6 > Sending Message: This is message number 7 > Sending Message: This is message number 8 > Sending Message: This is message number 9 > OK > Sending Disconnect.OK > Disconnecting...OK > --- first run of subscriber ---------------------- > -bash-2.05b$ ./activemq_tester -d sub -m 5 > Connecting......OK > Sending connect message.OK > Reading Response.Response: CONNECTED, > OK > Sending Subscribe.OK > Reading Subscribed Messsages.Received: MESSAGE, This is message number 0 > Received: MESSAGE, This is message number 1 > Received: MESSAGE, This is message number 2 > Received: MESSAGE, This is message number 3 > Received: MESSAGE, This is message number 4 > OK > Sending Disconnect.OK > Disconnecting...OK > ----- second run of subscriber ----------------- > -bash-2.05b$ ./activemq_tester -d sub -m 5 > Connecting......OK > Sending connect message.OK > Reading Response.Response: CONNECTED, > OK > Sending Subscribe.OK > Reading Subscribed Messsages. > =======> None of the remaning message numbers 5...9 are available. They are lost. > 2) Now to see the ghost STOMP subscriber problem, hit control-C to stop the subscriber. > Then rerun subscriber and publisher and see the following output..... > (publisher output not shown here, same as before) > -bash-2.05b$ ./activemq_tester -d sub -m 5 > Connecting......OK > Sending connect message.OK > Reading Response.Response: CONNECTED, > OK > Sending Subscribe.OK > Reading Subscribed Messsages.Received: MESSAGE, This is message number 1 > Received: MESSAGE, This is message number 3 > Received: MESSAGE, This is message number 5 > Received: MESSAGE, This is message number 7 > Received: MESSAGE, This is message number 9 > OK > Sending Disconnect.OK > Disconnecting...OK -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.