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 BC57717AD8 for ; Fri, 30 Jan 2015 23:16:20 +0000 (UTC) Received: (qmail 94181 invoked by uid 500); 30 Jan 2015 23:16:17 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 93770 invoked by uid 500); 30 Jan 2015 23:16:17 -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 8583 invoked by uid 99); 30 Jan 2015 15:14:09 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 30 Jan 2015 15:14:09 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=URI_HEX,URI_TRY_3LD X-Spam-Check-By: apache.org Received-SPF: error (athena.apache.org: local policy) Received: from [162.253.133.43] (HELO mwork.nabble.com) (162.253.133.43) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 30 Jan 2015 15:14:04 +0000 Received: from mjoe.nabble.com (unknown [162.253.133.57]) by mwork.nabble.com (Postfix) with ESMTP id EA7DE124696B for ; Fri, 30 Jan 2015 07:11:53 -0800 (PST) Date: Fri, 30 Jan 2015 07:07:24 -0800 (PST) From: artnaseef To: users@activemq.apache.org Message-ID: <1422630444808-4690727.post@n4.nabble.com> In-Reply-To: References: <1422583417525-4690692.post@n4.nabble.com> Subject: Re: Message priority and message selector - Active MQ version 5.4 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org tbain98 has the right idea. And that raises an interesting question regarding messages on-disk and not in-memory - I need to review to see how that operates. Here's how I expect it to work: the consumer with it's exclusive selector will get all pending messages which match its selector regardless of what other messages are unconsumed on the Queue. It would be easy to test the disk case too, like this: * Start a broker with persistence enabled (e.g. KahaDB) * Do not start any consumers * Produce a large number of persistent messages to a queue; split 50/50 between two selectors (10k or 100k should be adequate) * Shutdown the broker * Start the broker back up * Consume with only one selector and confirm it receives all of the matching messages. Now I'm curious and want to review the code. Note this scenario is another one I'll put on my list of reasons that selectors are bad for performance. If the broker has to replay every message in storage to possibly find those that match a single selector every time a new consumer is added, that could lead to some terrible performance scenarios. To the original use-case, can separate queues be used instead? -- View this message in context: http://activemq.2283324.n4.nabble.com/Message-priority-and-message-selector-Active-MQ-version-5-4-tp4690692p4690727.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.