Return-Path: Delivered-To: apmail-activemq-users-archive@www.apache.org Received: (qmail 52933 invoked from network); 18 Sep 2007 13:52:37 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 18 Sep 2007 13:52:37 -0000 Received: (qmail 14479 invoked by uid 500); 18 Sep 2007 13:52:29 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 14264 invoked by uid 500); 18 Sep 2007 13:52:28 -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 14254 invoked by uid 99); 18 Sep 2007 13:52:28 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Sep 2007 06:52:28 -0700 X-ASF-Spam-Status: No, hits=2.6 required=10.0 tests=DNS_FROM_OPENWHOIS,SPF_HELO_PASS,SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Sep 2007 13:54:20 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1IXdUj-0007zi-2V for users@activemq.apache.org; Tue, 18 Sep 2007 06:52:05 -0700 Message-ID: <12757588.post@talk.nabble.com> Date: Tue, 18 Sep 2007 06:52:05 -0700 (PDT) From: "wojtek.z" To: users@activemq.apache.org Subject: Re: Retrieving Messages Out of Sequence In-Reply-To: <12757410.post@talk.nabble.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: wojtek.zinczuk@autodata.net References: <12745847.post@talk.nabble.com> <12747860.post@talk.nabble.com> <12757410.post@talk.nabble.com> X-Virus-Checked: Checked by ClamAV on apache.org Crap I think I answered my own questions :) Problem was I wasn't setting the exclusive consumer / max Sessions on my OUT queue, instead I was putting it on my IN queue which my listener wasn't processing. After setting it on the correct one it works with 4.1.1 ... stupidity strikes again. Now on to try it with 4.0.1 wojtek.z wrote: > > Thanks for the replies guys > > Maybe to clarify I am using a custom message listener to retrieve the > messages. I recently tried to set "exclusive consumer" as well as > "maxSessions=1" but I still get the messages out of order. The strange > thing I found was that if i put messages on the queue and my listener isnt > running and then i turn it, the messages get retrieved as 3 , 2 , 1. If I > throw two sets of 3 messages they get retrieved as 3, 2, 1, 3, 2, 1, only > sometimes. > > When I have my listener running as I am putting messages on the queue they > are retrieved as 1, 2, 3. Can anyone help me understand the inconsistency > in behavior ? > > Here is my config sample > > > > > > > > value="ActiveMQ.In.Queue1?consumer.exclusive=true"/> > > > > > > > > > > > > Daryl Richter-3 wrote: >> >> On Sep 17, 2007, at 8:35 PM, ttmdev wrote: >> >>> >>> The fact that there are multiple consumers should not matter, >>> because the >>> messages are being assigned to "message groups" and AMQ should >>> dispatch all >>> messages in a particular group to one consumer thus guaranteeing >>> the order >>> of the messages in the group. See >>> http://activemq.apache.org/message-groups.html >> >> Sorry, I missed the part where he mentioned the groups. The page I >> referenced does say that Message Groups should preserve order, so >> perhaps this is a bug. >> >> >>> >>> I have tried this and it works fine for me. Although, I am using an >>> "asynchronous listener" and not polling for messages. >>> >>> >>> Daryl Richter-3 wrote: >>>> >>>> I assume you have multiple consumers. In this case, order is *not* >>>> preserved. >>>> >>>> Please see this page: >>>> >>>> http://activemq.apache.org/how-do-i-preserve-order-of-messages.html >>>> >>>> >>>> On Sep 17, 2007, at 5:47 PM, wojtek.z wrote: >>>> >>>>> >>>>> Howdy >>>>> >>>>> We are currently experiencing a bit of a problem with one of our >>>>> applications which relates to messages being retrieved from the >>>>> queue not in >>>>> order / sequence. >>>>> >>>>> The basic idea is as follows >>>>> >>>>> We create 3 sets of messages >>>>> Each message is tagged to a unique group >>>>> Each message is tagged with a sequence number of 1 - 3 >>>>> Each message is sent to the queue separately >>>>> >>>>> Now when we view the queue the messages are lined up in order ( ie >>>>> Group A = >>>>> 1 , 2 , 3 ) >>>>> >>>>> When we retrieve the messages though there is a very high chance >>>>> that the >>>>> messages dont come off the queue in the order they were put on >>>>> there. If we >>>>> have to sets of 3 messages ( from group A / B ) they tend to come >>>>> across >>>>> along the lines of A1 , B1 , A3 , B3 , A2 , B2. Now sometimes they >>>>> shuffle >>>>> around sometimes they come of the queue properly ( mostly only when >>>>> 1 set of >>>>> messages is active any more then that and the order breaks ) >>>>> >>>>> The way we retrieve the messages is also very simple, we simply >>>>> poll the >>>>> queue and grab each message one by one. >>>>> >>>>> I did some reading and there were a few bugs reported back in >>>>> version 4.0.x >>>>> that mentioned these problems. I tried this exercise with versions >>>>> 4.0.1 and >>>>> 4.1.1 and neither seem to work correctly. >>>>> >>>>> Is there a work around to this problem or maybe I am just doing >>>>> something >>>>> very silly that is causing this. Anyway if someone could let me >>>>> know that >>>>> would be most beneficial. Thanks ! >>>>> -- >>>>> View this message in context: http://www.nabble.com/Retrieving- >>>>> Messages-Out-of-Sequence-tf4470245s2354.html#a12745847 >>>>> Sent from the ActiveMQ - User mailing list archive at Nabble.com. >>>>> >>>> >>>> -- >>>> Daryl >>>> http://itsallsemantics.com >>>> >>>> "Under capitalism, man exploits man. >>>> Under communism, it's just the opposite." >>>> -- John Kenneth Galbraith >>>> >>>> >>>> >>> >>> -- >>> View this message in context: http://www.nabble.com/Retrieving- >>> Messages-Out-of-Sequence-tf4470245s2354.html#a12747860 >>> Sent from the ActiveMQ - User mailing list archive at Nabble.com. >>> >> >> -- >> Daryl >> http://itsallsemantics.com >> >> "We want great men who, when fortune frowns, will not be discouraged." >> -- Colonel Henry Knox, 1776 >> >> >> >> >> >> >> > > -- View this message in context: http://www.nabble.com/Retrieving-Messages-Out-of-Sequence-tf4470245s2354.html#a12757588 Sent from the ActiveMQ - User mailing list archive at Nabble.com.