Return-Path: Delivered-To: apmail-activemq-users-archive@www.apache.org Received: (qmail 74694 invoked from network); 17 Dec 2009 16:44:15 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 17 Dec 2009 16:44:15 -0000 Received: (qmail 81113 invoked by uid 500); 17 Dec 2009 16:44:15 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 81078 invoked by uid 500); 17 Dec 2009 16:44:14 -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 81068 invoked by uid 99); 17 Dec 2009 16:44:14 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 Dec 2009 16:44:14 +0000 X-ASF-Spam-Status: No, hits=-2.6 required=5.0 tests=BAYES_00 X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of gcjau-user-2@m.gmane.org designates 80.91.229.12 as permitted sender) Received: from [80.91.229.12] (HELO lo.gmane.org) (80.91.229.12) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 Dec 2009 16:44:12 +0000 Received: from list by lo.gmane.org with local (Exim 4.50) id 1NLJS9-0004id-C2 for users@activemq.apache.org; Thu, 17 Dec 2009 17:43:49 +0100 Received: from mail1.2e-systems.com ([217.86.139.180]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 17 Dec 2009 17:43:49 +0100 Received: from aleksandar by mail1.2e-systems.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 17 Dec 2009 17:43:49 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: users@activemq.apache.org From: Aleksandar Ivanisevic Subject: Re: STOMP order of acks? Date: Thu, 17 Dec 2009 17:43:25 +0100 Organization: Individual Lines: 57 Message-ID: References: <36e91d9d0912170153g179464d1n183df8e445206417@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: mail1.2e-systems.com Original-Sender: aleksandar@ivanisevic.de X-Face: "4JwcMHVV7.+Q"O&7#~e!/D3&-We*\6>YCmt~!;eHB\Qc$GGC}v}V[BFN]+pX;wqky_vXgj Ag!*"Am:~ffPJV&#cV*0"NeN9I]gaK$eDg`>`!5Ep&J_:/#KPnG3g.u|DV]i7P@l#46^UkNF\#"N%Q s9VP9Clc>qmNO$c(.^"2~nkJ.0LC+F{"sZI@+Ut User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) Cancel-Lock: sha1:scrCMfdz05pYVb8WDg9XBRtOdXY= Sender: news Dejan Bosanac writes: > Hi, > > it's not a but. With client ack, the ack you send will acknowledge all > message up to the one you're sending ack for. So if you send acks > out of order, you'll get "unexpected ack" message. Interesting, I presume this is ActiveMQ's own interpretation of a STOMP protocol? is this the official protocol definition? http://stomp.codehaus.org/Protocol because there under ACK it doesn't mention anything about "up to" and no matter how hard I try I couldn't see a way the spec could be interpreted that way. > > You can use client-individual ack to achieve your desired > functionality (http://issues.apache.org/activemq/browse/AMQ-1874) IMHO, this should have been the default behaviour. > > Cheers > -- > Dejan Bosanac - http://twitter.com/dejanb > > Open Source Integration - http://fusesource.com/ > ActiveMQ in Action - http://www.manning.com/snyder/ > Blog - http://www.nighttale.net > > > > On Thu, Dec 17, 2009 at 10:25 AM, Aleksandar Ivanisevic > wrote: >> >> Hi, >> >> I have a consumer with prefetch>1 and client ack. If I send the acks >> out of order (not in the order the messages are received), I get an >> exception: >> >> org.apache.activemq.transport.stomp.ProtocolException: Unexpected ACK received for message-id >> >> is this in JMS specification that acks need to be received in the same >> order or is it STOMP bug? >> >> If it is supposed to be like that, how is one supposed to handle >> messages in parallel? Have a separate consumer for each thread? >> >> Hm, just found out that when I get this exception the message never >> gets redelivered, so this must be a STOMP bug, right? >> >> >> >