Return-Path: X-Original-To: apmail-activemq-users-archive@www.apache.org Delivered-To: apmail-activemq-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 27369D951 for ; Thu, 10 Jan 2013 14:23:30 +0000 (UTC) Received: (qmail 50249 invoked by uid 500); 10 Jan 2013 14:23:29 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 50120 invoked by uid 500); 10 Jan 2013 14:23:29 -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 50112 invoked by uid 99); 10 Jan 2013 14:23:29 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 Jan 2013 14:23:29 +0000 X-ASF-Spam-Status: No, hits=0.7 required=5.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: 46.36.54.7 is neither permitted nor denied by domain of karel.gardas@centrum.cz) Received: from [46.36.54.7] (HELO kremilek.roznovan.cz) (46.36.54.7) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 Jan 2013 14:23:21 +0000 Received: from kremilek.roznovan.cz (localhost.localdomain [127.0.0.1]) by kremilek.roznovan.cz (Postfix) with ESMTP id 23E711068 for ; Thu, 10 Jan 2013 15:15:52 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.0 (2010-01-18) on kremilek.roznovan.cz X-Spam-Level: X-Sagator-Scanner: 1.2.0-1 at kremilek.roznovan.cz; log(log(status(report(drop(quarantine(buffer2mbox(libclam()))))), status(drop(quarantine(SpamAssassinD()))))) X-Sagator-ID: 20130110-151552-0001-01785-DnaW8y@kremilek.roznovan.cz Received: from [10.0.0.5] (46-36-60-137.roznovan.cz [46.36.60.137]) by kremilek.roznovan.cz (Postfix) with ESMTP id F05EBDF4 for ; Thu, 10 Jan 2013 15:15:51 +0100 (CET) Message-ID: <50EECEC3.70009@centrum.cz> Date: Thu, 10 Jan 2013 15:22:59 +0100 From: Karel Gardas User-Agent: Mozilla/5.0 (X11; SunOS i86pc; rv:10.0.4) Gecko/20120628 Thunderbird/10.0.4 MIME-Version: 1.0 To: users@activemq.apache.org Subject: Subscriber losing messages (from topic) Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Old-Spam-Status: No, score=0.4 required=15.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_RP_RNBL,RDNS_DYNAMIC autolearn=no version=3.3.0 Hello, I'm playing a bit with ActiveMQ 5.7.0 and found that under some circumstances my subscriber looks like losing messages which are delivered to him from the broker. Honestly speaking I don't know if to blame subscriber or broker in this case but while looking into web console of the broker, the broker claims the messages are delivered, but I don't see them on subscriber. It took me some time to duplicate this issue on as simple as possible example, but finally I've been able to a bit hack activemq's own demo to duplicate it. If you'd like to see the same effect as I see now, just go to activemq/example/src and add: try { Thread.sleep(1); } catch (Exception ex) { ex.printStackTrace(); } into ConsumerTool.java's onMessage method. This will ensure that onMessage on consumer will run a little bit slower than producer is able to send messages and you will see the effect. Once done, just run consumer with: ant consumer -Dtopic=true -Dverbose=false -Dmax=1000000 -Dsubject=TRM and producer with: ant producer -Dtopic=true -Dverbose=false -Dmax=1000000 -Dsubject=TRM if everything is working well, then both consumer and producer should end once delivering 1000000 messages. The problem is that consumer does not end due to losing some of the messages somewhere. If this does not happen on your box, please increase number of milliseconds on Thread.sleep to make onMessage even slower. I'm running this on Solaris 11/JDK 1.7 on Xeon E5 2.0 GHz here. Now, I do have following questions: - am I right assuming the example above should really deliver all the messages to the consumer onMessage method? - is this already known issue or shall I report it properly to ActiveMQ's bug tracking system? Just to make sure, I've also tried running consumer with ant consumer -Dtopic=true -Dverbose=false -Dmax=1000000 -Dsubject=TRM -Durl="tcp://localhost:61616?jms.prefetchPolicy.queuePrefetch=0" -- but it neither helps. At least I've thought pre-fetching might cause this so I tried... BTW: I've seen the same issue but not on demo, but on our own application also while running subscriber on top of 5.6.0 and 5.5.0 releases. I always used 5.7.0 release for broker and producer though. I've not seen it on demo as I've not tested this with older releases but I would guess the issue will be there too. Thanks a lot for any idea about what's going wrong here. Karel