Return-Path: Delivered-To: apmail-geronimo-activemq-users-archive@www.apache.org Received: (qmail 62465 invoked from network); 22 Aug 2006 15:49:38 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 22 Aug 2006 15:49:38 -0000 Received: (qmail 55941 invoked by uid 500); 22 Aug 2006 15:49:37 -0000 Delivered-To: apmail-geronimo-activemq-users-archive@geronimo.apache.org Received: (qmail 55921 invoked by uid 500); 22 Aug 2006 15:49:37 -0000 Mailing-List: contact activemq-users-help@geronimo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: activemq-users@geronimo.apache.org Delivered-To: mailing list activemq-users@geronimo.apache.org Received: (qmail 55904 invoked by uid 99); 22 Aug 2006 15:49:36 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Aug 2006 08:49:36 -0700 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=DNS_FROM_RFC_ABUSE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of chirino@gmail.com designates 64.233.184.225 as permitted sender) Received: from [64.233.184.225] (HELO wr-out-0506.google.com) (64.233.184.225) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Aug 2006 08:49:35 -0700 Received: by wr-out-0506.google.com with SMTP id i5so389598wra for ; Tue, 22 Aug 2006 08:49:15 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=TqX3NoSOGpNIn8hX0ZXC03im1icS6OWBjohdYfk4UeQD9LTDw51ArX4umU9fO0Is0aPQ4otjV5PKyyKSOF3W+f2f4d2Zn22W+Kq3CMlnfmjOoGOJUyxN7nsZYF0q3eVrrNqPVcskAWpGGZAbnxq0eyFzdctEOSRRaY64zGhQyHk= Received: by 10.67.24.13 with SMTP id b13mr4444729ugj; Tue, 22 Aug 2006 08:49:14 -0700 (PDT) Received: by 10.66.237.5 with HTTP; Tue, 22 Aug 2006 08:49:14 -0700 (PDT) Message-ID: Date: Tue, 22 Aug 2006 11:49:14 -0400 From: "Hiram Chirino" Sender: chirino@gmail.com To: activemq-users@geronimo.apache.org Subject: Re: Stomp Receipts In-Reply-To: <5924444.post@talk.nabble.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <5921824.post@talk.nabble.com> <5924444.post@talk.nabble.com> X-Google-Sender-Auth: 7680613a139a75e2 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hi Peter, Yes.. Unfortunately this is how asynchronous messaging works. There is no way around it unless you switch to a request/reply model like HTTP uses. But then you loose all the performance gains that a asynchronous model provides! If your application is single threaded, you should place those unexpected messages into a buffer while your are polling for your response. Then when your application does a receive(), it should first check that buffer for messages and nothing is there, then it should wait on the socket for dispatched messages. On 8/22/06, blueshed wrote: > > Yup, the prefetchSize is 1 - but still I get back the MESSAGE before the > RECEIPT. The ACK is required before more messages such as RECEIPT can come > through. > > Perhaps this will explain: > > ->CONNECTED > <-SUBSCRIBE > ->MESSAGE > <-ACK > ->RECEIPT(SUBSCRIBE) > ->RECIEPT(ACK) > > I hoped I could run it like this: > > ->CONNECTED > <-SUBSCRIBE > ->RECEIPT(SUBSCRIBE) > ->MESSAGE > <-ACK > ->RECIEPT(ACK) > > PeterB > PS. Thanks for getting back to first mail so quickly. > > > > > > James.Strachan wrote: > > > > If you set the prefetchSize to 1 then you will only be given 1 message > > by your subscription so that you can ACK the message, then you'll be > > given another message etc. > > > > http://incubator.apache.org/activemq/stomp.html > > > > e.g. add the following header > > > > activemq.prefetchSize: 1 > > > > More background here > > http://incubator.apache.org/activemq/what-is-the-prefetch-limit-for.html > > > > On 8/22/06, blueshed wrote: > >> > >> I have built an asynchronous stomp client that works well enough. I tried > >> to > >> introduce a synchronous stomp client but came across a problem: reciepts > >> are > >> sent out of order. When I send a SUBCRIBE I get a MESSAGE back before the > >> RECEIPT - the MESSAGE requires an ACK before I get any more messages. The > >> ACK too requests a RECEIPT and then two RECEIPTS come back. I would like > >> my > >> Stomp Client to work with Twisted Python and it is single threaded. I > >> would > >> like to work with messages in order with as little state as possible. Any > >> thoughts? Could message consumption on the server complete the > >> consumption > >> before sending more messages? > >> -- > >> View this message in context: > >> http://www.nabble.com/Stomp-Receipts-tf2145063.html#a5921824 > >> Sent from the ActiveMQ - User forum at Nabble.com. > >> > >> > > > > > > -- > > > > James > > ------- > > http://radio.weblogs.com/0112098/ > > > > > > -- > View this message in context: http://www.nabble.com/Stomp-Receipts-tf2145063.html#a5924444 > Sent from the ActiveMQ - User forum at Nabble.com. > > -- Regards, Hiram Blog: http://hiramchirino.com