Return-Path: Delivered-To: apmail-camel-users-archive@www.apache.org Received: (qmail 34932 invoked from network); 24 Apr 2010 08:51:18 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 24 Apr 2010 08:51:18 -0000 Received: (qmail 97496 invoked by uid 500); 24 Apr 2010 08:51:18 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 97377 invoked by uid 500); 24 Apr 2010 08:51:18 -0000 Mailing-List: contact users-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@camel.apache.org Delivered-To: mailing list users@camel.apache.org Received: (qmail 97369 invoked by uid 99); 24 Apr 2010 08:51:17 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 24 Apr 2010 08:51:17 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of willem.jiang@gmail.com designates 209.85.212.173 as permitted sender) Received: from [209.85.212.173] (HELO mail-px0-f173.google.com) (209.85.212.173) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 24 Apr 2010 08:51:09 +0000 Received: by pxi19 with SMTP id 19so1001289pxi.32 for ; Sat, 24 Apr 2010 01:50:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=PMpRTLQW2MxWj3DwE02wvB8KInLFRjHOWLQPGRz3E4E=; b=WDsYAiERLvDx1OB0Lan0PEpyjSrsPBxsVeUDat4yYzVcMvGn9LXjCP5auBGj7SzS4B KgQXwp1PenbGcsVaiop4aKqO4eFrd3PIYzqEQww/IgFztR9dduZAmGybssmA18mpJh5L 30hOSec9Zs36+/vBgXcsOxzGw2THIY8JJGsjY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; b=e825H1JXMyg80VHzuz5Ht9RPpxFwe7u4vfGnBgzKEQG/UZMuaBI2i3URmcnOUrlrpg WW8wW1wm5NSB233zjNZMnWp5HAhI7+ShdW6UwVda7nCixBKmtQ/1hA1VF9mvhJkxKz5j mnW/RJBjk/bOTZqqo0TLAXyAQ+e9VOrXt9Avk= Received: by 10.115.117.6 with SMTP id u6mr1441313wam.191.1272099047558; Sat, 24 Apr 2010 01:50:47 -0700 (PDT) Received: from [192.168.0.158] ([123.116.37.105]) by mx.google.com with ESMTPS id f11sm9060392wai.11.2010.04.24.01.50.45 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 24 Apr 2010 01:50:46 -0700 (PDT) Message-ID: <4BD2B0E2.3080501@gmail.com> Date: Sat, 24 Apr 2010 16:50:42 +0800 From: Willem Jiang User-Agent: Thunderbird 2.0.0.24 (Macintosh/20100228) MIME-Version: 1.0 To: users@camel.apache.org Subject: Re: CLIENT_ACKNOWLEDGE and Sessions References: <28346183.post@talk.nabble.com> In-Reply-To: <28346183.post@talk.nabble.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org Hi, camel-jms consumer is based on Spring JMSMessageListenerContainer, after digging the JMS message receiving code for a while, it's consuming one message per session. Willem Monica_G wrote: > Hi, > > How do sessions work with Camel? Is there only one message consumed per > session? > > I've set the acknowledgment mode to be CLIENT_ACKNOWLEDGE via the > JmsComponent http://camel.apache.org/jms.html > (http://camel.apache.org/jms.html) . However, I read the following on the > http://java.sun.com/javaee/5/docs/tutorial/doc/bncfu.html#bncfw sun jms site > > "Session.CLIENT_ACKNOWLEDGE: A client acknowledges a message by calling the > message’s > acknowledge method. In this mode, acknowledgment takes place on the session > level: > Acknowledging a consumed message automatically acknowledges the receipt of > all > messages that have been consumed by its session. For example, if a message > consumer > consumes ten messages and then acknowledges the fifth message delivered, all > ten messages > are acknowledged." > > If camel only consumes one message per session then I'm golden. I did some > local tests, and this appears to be the case, but I wanted to double check > here in case I missed something. > > > Thank you, > > Monica