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 CA1BA11405 for ; Wed, 16 Jul 2014 01:13:59 +0000 (UTC) Received: (qmail 51596 invoked by uid 500); 16 Jul 2014 01:13:59 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 51554 invoked by uid 500); 16 Jul 2014 01:13:59 -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 51530 invoked by uid 99); 16 Jul 2014 01:13:58 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 Jul 2014 01:13:58 +0000 X-ASF-Spam-Status: No, hits=0.6 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of noel.oconnor@gmail.com designates 209.85.216.46 as permitted sender) Received: from [209.85.216.46] (HELO mail-qa0-f46.google.com) (209.85.216.46) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 Jul 2014 01:13:55 +0000 Received: by mail-qa0-f46.google.com with SMTP id v10so149496qac.19 for ; Tue, 15 Jul 2014 18:13:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=g64sZLD5KOhnQz2WdKUh6fR8ljNFT7de1deLxjEabjk=; b=xJGAZ98/QRTe2qnWozEiweHYCPZWWMmXIPtBc/s7+rZoiVjl6T1ppTy/8jhH7hX2Cd G5E2Sv3ZsLdJbGFHQiLQF7TZu7I0jAjanysU2v9xaI3dVlWgvQ+BwUFYjsQ13PvGlySk SBaIR2A8eF0oYexF1YKEFKC+DlL8sled4TuVk1arW5SCzdbZfdnPFjzb2AjqS+/Y3opt OzLCw6W72un2BIVlVEDzwrWAPg68PxS92lKyBgwgsNTL2ERbtAkvChzWfUxlqVbQ1Ttd 4f/UcDiKHxWROlsmRZ57JTwlVXL8vdMvjAe9ymer8vfwEg/gwjVQPJ4Sl+h6c9WAvGsT cVSg== X-Received: by 10.140.43.118 with SMTP id d109mr38298589qga.10.1405473214138; Tue, 15 Jul 2014 18:13:34 -0700 (PDT) MIME-Version: 1.0 Received: by 10.229.190.193 with HTTP; Tue, 15 Jul 2014 18:13:13 -0700 (PDT) In-Reply-To: <1405442738565-4683287.post@n4.nabble.com> References: <1405345144884-4683240.post@n4.nabble.com> <53C404C8.8050906@gmail.com> <1405400246675-4683265.post@n4.nabble.com> <1405442738565-4683287.post@n4.nabble.com> From: Noel OConnor Date: Wed, 16 Jul 2014 11:13:13 +1000 Message-ID: Subject: Re: Lost messages - Abnormal Behaviour of activeMQ To: users@activemq.apache.org Content-Type: text/plain; charset=UTF-8 X-Virus-Checked: Checked by ClamAV on apache.org +1 This approach is a derivative of the single purpose queue anti-pattern see http://books.google.com.au/books?id=1G3Pa_LoIGQC&pg=PA236&lpg=PA236&dq=single+purpose+queue&source=bl&ots=O57wy-t5MZ&sig=ADfUPDpAUywSVNnrnanjnkus13g&hl=en&sa=X&ei=nNDFU6DYIcvn8AWPgoKYBw&ved=0CB4Q6AEwAA#v=onepage&q=single%20purpose%20queue&f=false Consider using topics with selectors or camel with content based routing to improve it. On Wed, Jul 16, 2014 at 2:45 AM, artnaseef wrote: > If I understand correctly, the code is doing the following: > > * Competing consumers read from the same queue > * One of several consumers will be able to process a message while the other > two will not > * When the process can handle the message, it does so and acknowledges it > * When the process cannot handle the message, it rejects (I don't see > rejection in the code), so the message can be handled by another process > > Is this correct? If so, I recommend an architectural review. This model of > processing will lead to many problems with ActiveMQ. > > For example, ActiveMQ never guarantees which consumer will receive a > message. So, the same message could be redelivered to a single consumer > multiple times and never to any other consumer. In addition, ActiveMQ has > settings for redelivery; if a message fails to process too many times, it > will be discarded (either sent to a DLQ or just dropped). > > Let me know if I've misunderstood. > > > > -- > View this message in context: http://activemq.2283324.n4.nabble.com/Lost-messages-Abnormal-Behaviour-of-activeMQ-tp4683240p4683287.html > Sent from the ActiveMQ - User mailing list archive at Nabble.com.