Return-Path: Delivered-To: apmail-activemq-users-archive@www.apache.org Received: (qmail 43792 invoked from network); 1 Nov 2010 09:32:55 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 1 Nov 2010 09:32:55 -0000 Received: (qmail 41547 invoked by uid 500); 1 Nov 2010 09:33:26 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 41508 invoked by uid 500); 1 Nov 2010 09:33:23 -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 41500 invoked by uid 99); 1 Nov 2010 09:33:23 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Nov 2010 09:33:23 +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 gary.tully@gmail.com designates 209.85.160.171 as permitted sender) Received: from [209.85.160.171] (HELO mail-gy0-f171.google.com) (209.85.160.171) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Nov 2010 09:33:16 +0000 Received: by gyd12 with SMTP id 12so3749497gyd.2 for ; Mon, 01 Nov 2010 02:32:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type; bh=vC6cK0MZUZZZD9AxGAyMFGNxJzp8a8EeDlbgiE8mwFM=; b=FHOcZM5e82V7e5TQhL7NTVQqLELa/lg/8uZrDsPCbGLC2we37i9CHyMVRFT22rIUlE qE0Niw9rmp3Wbn2g0ZQGMRkxyu4iJKgv43QdAwRtJ6XdXXyVopI0yRZHQ0dtnZvgnvUJ vWDv6bsZLiRO4LJpwRSKpO55N34qKOFaULe/o= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=T+S1Xi8gma3GaDJkE6tps/Wuyfm+FT4G8QLJXbqgg2rYc0epDlwJZAAMQ2X4KROFsB O2gG0wc2SLg0DI9RuPuD+CWzRM8n5k/BWloPVs4wevw+oIWknCP5zULcBJTeDmczYZ29 36FX8JFzeUQaF5vsCLtGX7U1CNpKwvU9U1JXw= MIME-Version: 1.0 Received: by 10.229.96.130 with SMTP id h2mr13795436qcn.284.1288603975532; Mon, 01 Nov 2010 02:32:55 -0700 (PDT) Received: by 10.229.45.18 with HTTP; Mon, 1 Nov 2010 02:32:55 -0700 (PDT) In-Reply-To: <9C408626-C3E2-4346-9CD4-2CF4C20D8C1D@homeaway.co.uk> References: <9C408626-C3E2-4346-9CD4-2CF4C20D8C1D@homeaway.co.uk> Date: Mon, 1 Nov 2010 09:32:55 +0000 Message-ID: Subject: Re: Virtual Topic and missed messages gone missing with selectorAware=true From: Gary Tully To: users@activemq.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org Message expiry may help in the short term, set a time to live on the messages such that the built up unmatched messages expire and are removed. On 1 November 2010 09:20, Maciej Rakowicz wrote: > All, > > amq 5.4.0. jdk 1.6 > > Scenario: > broker persistence=true, selectorAware=false > Virtual Topic with say one queue. There is a consumer A connected to that > queue with a selector. All works fine. Consumer A dies, messages pile up, > consumer A starts back up, missed messages are redelivered. You can easily > verify that queue receives all posted messages while consumer's down. > Now, adding consumer B, since selectorAware=false and consumer B uses an > exclusive selector messages sent to consumer A are not consumed by consumer > B. All good save the fact that all unmatched messages end up polluting > consumer's B queue. All according to the documentation. > Flipping selectorAware to true solves one problem but introduces another > (way more important in my setup). Unmatched messages won't pile up on > consumer's B queue which is fine. However, if consumer A dies they are not > sent to consumer's A queue (disappearing after reaching the topic - I dunno > where they go) hence disabling any missed message delivery on consumer's A > startup. > > I there any way around it? I really need to handle all missed messages with > no exception. At the same time I cannot allow stacking up messages in each > and every queue although they are not matched. > > Btw. I do not have a list of consumers in advance, the subscription is fully > dynamic, although since broker runs persistence, once subscribed I do have > an idea of who's subscribed even if connection is currently down. > > I would appreciate any hints. > > mac -- http://blog.garytully.com http://fusesource.com