Return-Path: Delivered-To: apmail-activemq-users-archive@www.apache.org Received: (qmail 41477 invoked from network); 15 Dec 2010 09:02:45 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 15 Dec 2010 09:02:45 -0000 Received: (qmail 54354 invoked by uid 500); 15 Dec 2010 09:02:44 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 54120 invoked by uid 500); 15 Dec 2010 09:02:41 -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 54112 invoked by uid 99); 15 Dec 2010 09:02:41 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Dec 2010 09:02:41 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=10.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of chubrilo@gmail.com designates 209.85.215.172 as permitted sender) Received: from [209.85.215.172] (HELO mail-ey0-f172.google.com) (209.85.215.172) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Dec 2010 09:02:35 +0000 Received: by eyd10 with SMTP id 10so986525eyd.17 for ; Wed, 15 Dec 2010 01:02:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:content-type:content-transfer-encoding; bh=VVjK+CSD31ru5T+MCsD5YPf5c2nlUcywfvx1gG95h5s=; b=IFH1e44txhr7Tgk7AwM/BrtwQ3dMK32IEZzYAD4l9nSj6ZZVCIHt5aFjiHCUXNtzNb /fYOa2i0DukNuc084YpVap6QoDn++JMh2z2bLkKuTSFz0BcH8Sjewd5cPY8zzkop0K7b J4ifRAK6UlMvnYakp/opBBUdg/gv22bqiwCG4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; b=kKVzLay2Z1rDQiVM6PyAVIUVfWKtM/OolXq+B7VvaRgOdtq9/2MAU8EARfKmkFu733 NlRU1u5+sc0gprSpm4W1ms3x5wNvrtWNQEN6F9yXkbs/sh04ZLovBV5bOlRpQrUleyb4 z+000ZDbGscOlvSFMRKDiq3dYDlZnE/xZ1FSQ= MIME-Version: 1.0 Received: by 10.213.109.15 with SMTP id h15mr1425906ebp.30.1292403734977; Wed, 15 Dec 2010 01:02:14 -0800 (PST) Sender: chubrilo@gmail.com Received: by 10.213.32.65 with HTTP; Wed, 15 Dec 2010 01:02:14 -0800 (PST) In-Reply-To: <61BDC4F3-9EA1-4B2C-AC42-87DA4510C195@crackpot.org> References: <77D15CDA-C1D5-4437-B247-F51E0D6F637E@crackpot.org> <61BDC4F3-9EA1-4B2C-AC42-87DA4510C195@crackpot.org> Date: Wed, 15 Dec 2010 10:02:14 +0100 X-Google-Sender-Auth: _kdMzVPtF5QKe-li0OU01B-bGXo Message-ID: Subject: Re: ajax handling fast messages From: Dejan Bosanac To: users@activemq.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Hi Jeff, Alex, having some kind of test that reproduces the issue would be great. It'd be good to add something to the tests Alex already contributed https://fisheye6.atlassian.com/browse/activemq/trunk/activemq-web-demo/src/= main/webapp/test/amq_test.html?r=3DHEAD Cheers -- Dejan Bosanac ----------------- FuseSource - The experts in open source integration and messaging. Email: dejanb@fusesource.com Web: http://fusesource.com Twitter: =A0http://twitter.com/dejanb ActiveMQ in Action - http://www.manning.com/snyder/ Blog - http://www.nighttale.net On Tue, Dec 14, 2010 at 7:17 PM, Alex Dean wrote: > Hi Jeff. =A0That's great news. =A0I'm not very Java-savvy, but I've made = a few patches to the activemq ajax code in the past. =A0I've spent a bit of= time lately trying to get junit test cases working for testing MessageList= enerServlet, so I haven't actually made much progress in solving the issue = at hand. =A0If you've found the error, that's fantastic. =A0Can you post yo= ur patch? > > To get a ticket reported, use https://issues.apache.org/jira/secure/Creat= eIssue!default.jspa. =A0You'll need to register before you can open an issu= e. =A0If you can attach a patch, I will happily contribute to the testing e= ffort. > > alex > > On Dec 14, 2010, at 10:48 AM, Jeff Rose wrote: > >> Hi Alex, >> =A0Thanks for the response. =A0We looked into it a bit more based on you= r >> suggestion, and we discovered that there is an error occurring when the >> continuation is resumed in onMessageAvailable in AjaxListener.java. =A0I= t >> looks like this onMessageAvailable handler is being called every time a = new >> message arrives on the queue, and then it is trying to resume a continua= tion >> that has already been resumed, which causes an illegal state exception. >> We've been trying to fix the bug =A0by checking first: >> >> =A0 !continuation.isResumed() >> >> but we are still getting the error occasionally (although it does often = get >> all of the messages now). =A0This seems to be a pretty fundamental bug i= n the >> AJAX support of ActiveMQ. =A0Definitely worth posting a ticket (although= I >> don't know where that is done). >> >> -Jeff >> >> >> On Fri, Dec 10, 2010 at 6:33 PM, Alex Dean wrote: >> >>> >>> On Dec 10, 2010, at 11:06 AM, Jeff Rose wrote: >>> >>>> Hi, >>>> Based on the ajax chat example I've put together a small test page to >>>> display messages that I post to a topic or queue using a php script. >>> When I >>>> send 10 messages in a for loop from PHP then the ajax handler is only >>>> getting called with a couple of the messages though. =A0Looking at Act= iveMQ >>>> with jconsole I can see that all of the messages are getting taken off >>> the >>>> queue, but they don't all get to the browser. =A0Do I need to do somet= hing >>>> special in order to make sure I get all of the messages? >>>> >>>> The relevant code is posted below. =A0Any thoughts or advice would be >>>> appreciated. >>> >>> I've noticed the same issue recently. =A0If I publish 5 messages via a >>> ruby+stomp publisher, I receive all 5 in a ruby+stomp consumer, but I o= nly >>> see 1 message in a javascript/ajax consumer. The XML el= ement >>> always has only a single element. =A0(I can see this in Fire= bug.) >>> The admin webapp shows that all my messages are being de-queued, so I t= hink >>> the ajax servlet is picking up the messages but failing to deliver them= to >>> the browser. >>> >>> Just this morning I was poking around in the code trying to see what's >>> going on. =A0I have a guess it's in MessageListenterServelet.doMessages= (). >>> There's some code in there which should put multiple element= s >>> into a single , but it's not happening for some reason. >>> >>> Maybe we should open a ticket for this? >>> >>> alex > >