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 BCE56100D1 for ; Tue, 28 Apr 2015 13:09:33 +0000 (UTC) Received: (qmail 5942 invoked by uid 500); 28 Apr 2015 13:09:33 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 5901 invoked by uid 500); 28 Apr 2015 13:09:33 -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 5889 invoked by uid 99); 28 Apr 2015 13:09:33 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Apr 2015 13:09:33 +0000 X-ASF-Spam-Status: No, hits=2.4 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: message received from 54.191.145.13 which is an MX secondary for users@activemq.apache.org) Received: from [54.191.145.13] (HELO mx1-us-west.apache.org) (54.191.145.13) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Apr 2015 13:09:27 +0000 Received: from mail-ig0-f175.google.com (mail-ig0-f175.google.com [209.85.213.175]) by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org) with ESMTPS id 8CDFF2143A for ; Tue, 28 Apr 2015 13:09:07 +0000 (UTC) Received: by igbyr2 with SMTP id yr2so89906579igb.0 for ; Tue, 28 Apr 2015 06:09:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:content-type; bh=vuAiH1TvsUT3/a5FUzmq9ltvvum9Nx1tDth86wYsl5E=; b=fLNGWujmxwuPei6r6MNnIpuAqV61VnpjjezrdJo0qg/PMJY+rVAczsooFstNFAUhHi c4Wc3edZAa8sTOmySAT1ALd7n0gBB65+WnQPN+/XcsEcypoasQXJobBlTXFeU7VEODqf gDL1XKVRe2SQSokALHw5AqDlgwEhWaBRi9Zr8m31KW/z3dwifxXt5vosFfPNze9vrfEo Uj8Wzd5eH1pyLpHhqAHLOX6r4kXNfw2SxDbArUh11MI6szp70mAZtgyX1ybI9LG7Upcg iTHJAdcGEDAFqsbiqY/YZxcuV33UNz6w8EgOH56Ofhh26outtPEbeENnuPfXQDYm21o3 jfSA== MIME-Version: 1.0 X-Received: by 10.42.70.18 with SMTP id d18mr17652031icj.41.1430226547052; Tue, 28 Apr 2015 06:09:07 -0700 (PDT) Sender: tbain98@gmail.com Received: by 10.50.251.141 with HTTP; Tue, 28 Apr 2015 06:09:06 -0700 (PDT) Received: by 10.50.251.141 with HTTP; Tue, 28 Apr 2015 06:09:06 -0700 (PDT) In-Reply-To: References: Date: Tue, 28 Apr 2015 07:09:06 -0600 X-Google-Sender-Auth: Oaq_BA2D_p4RrlWEx91RwQeuQSQ Message-ID: Subject: Re: DLQ, cause:null From: Tim Bain To: ActiveMQ Users Content-Type: multipart/alternative; boundary=90e6ba6e8ad44915dd0514c8911e X-Virus-Checked: Checked by ClamAV on apache.org --90e6ba6e8ad44915dd0514c8911e Content-Type: text/plain; charset=UTF-8 On Apr 28, 2015 3:21 AM, "James Green" wrote: > > On 27 April 2015 at 17:32, Tim Bain wrote: > > > On Mon, Apr 27, 2015 at 7:30 AM, James Green > > wrote: > > > > > > > > Surely if a client takes more than the receive time-out to process a > > > message, a re-delivery will occur? If not, what does happen? > > > > > > I don't believe the receive timeout relates to processing a message at > > all. The receive timeout is the amount of time you'll wait to see if a > > message is available to be processed before returning control; it ends when > > message processing begins, whereas your description indicates you're > > expecting that it starts when message processing begins. > > > > When a client takes more than the receive timeout to process a message, the > > client will continue processing the message, and continue processing the > > message, and continue processing the message, until eventually it > > finishes. The only way I know of to time out a client is by using the > > AbortSlowAckConsumerStrategy (and even then, I'm not sure the consumer will > > actually stop processing the current message, it just won't get to process > > any more after the current one), but that's a completely different path > > (and entirely optional, and not enabled by default). By default, message > > processing just takes as long as it takes, which is why we have strategies > > available to react to slow consumers. > > > > So to re-work my understanding, the pre-fetch buffer in the connected > client is filled with messages and the broker's queue counters react as if > this was not the case (else we'd see 1,000 drop from the pending queue > extremely quickly, and slowly get dequeued which we do not see). Pretty much right, though I wouldn't say the broker's counters react as if this was not the case; rather, the broker's dispatch counter increases immediately but the dequeue counter won't increase until the broker removes the message, and that won't happen until the consumer acks it. Until that happens, the message exists in both places and the counters reflect that. It sounds like you're observing the broker through the web console; there's WAY more information available through the JMX beans and you'll understand this better by watching them instead of the web console. So I highly recommend firing up JConsole and looking at the JMX beans. > The client (we're using standard Camel JMS consumer routing) has this > buffer and the session polls this buffer for the next message, sending it > to the receive() method of the consumer (which is a Spring object by the > looks of things). This polling is subject to a receiveTimeout time-out. That matches my understanding of how it works. > All accurate or almost so far? > > What I'm not "getting" is why we we no longer getting the DLQ entries, > having only increased the receiveTimeout. It is as if the client process is > so busy the pre-fetch buffer cannot react fast enough. > > James I agree, I don't understand that, particularly because even if the broker was so loaded down that you were hitting that timeout, I don't see how that would result in a failed delivery attempt. Your receive() call would just return null and Camel would just call receive() again and everything would be fine. (This is exactly what happens when there aren't any messages on the queue, and nothing bad happens then.) So my gut reaction is that the timeout is a red herring and something else is going on. Have you switched that setting between the two values while playing identical messages (either generated or recorded) to be sure that that setting really is the cause of this behavior? Also, when messages are failing, do all of them fail? If it's only some of them, what's the common thread? Tim --90e6ba6e8ad44915dd0514c8911e--