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 B00B696B6 for ; Tue, 10 Apr 2012 10:47:45 +0000 (UTC) Received: (qmail 53299 invoked by uid 500); 10 Apr 2012 10:47:45 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 53268 invoked by uid 500); 10 Apr 2012 10:47:45 -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 53260 invoked by uid 99); 10 Apr 2012 10:47:45 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Apr 2012 10:47:45 +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 gary.tully@gmail.com designates 209.85.216.43 as permitted sender) Received: from [209.85.216.43] (HELO mail-qa0-f43.google.com) (209.85.216.43) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Apr 2012 10:47:40 +0000 Received: by qadb15 with SMTP id b15so2739026qad.16 for ; Tue, 10 Apr 2012 03:47:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=j23DOd4DSqSSwF21OuD7rNyeIQRai9Ha6gTyL7JThNU=; b=NOy29YH98foFGj1sYlD5G/WxkoY026WtDBk0SeGuFBN+7o2m63HHGvdASACYp0VKN+ 1AGV1GVWcmnNN9UGsGbw3hz+3wsVlhslgdA+4CiC9KbBVsewtDUCqODsmdjylTxSxtQM ORmOV+Ummm4IRJZRK9/Oz9m5qsGu9jDomxTDvC+3Z3Pm1fHDiH8xZa79DlLfjAUqV3b2 RjsUgU9tjV+czuKaV0EWzim5DSIGBMZaBdcjHvQdi0VkHmATeEKabOgnh0cUAQi/ovvm c47uFUQ9Nt1ouJdARRbCXqAoVImurELfqg1F0iPllucmcNTHbKhryziU3f7DcsUjWapY BGrw== MIME-Version: 1.0 Received: by 10.229.102.101 with SMTP id f37mr4158370qco.37.1334054839698; Tue, 10 Apr 2012 03:47:19 -0700 (PDT) Received: by 10.229.158.4 with HTTP; Tue, 10 Apr 2012 03:47:19 -0700 (PDT) In-Reply-To: <1334052836582-4545137.post@n4.nabble.com> References: <1334052836582-4545137.post@n4.nabble.com> Date: Tue, 10 Apr 2012 11:47:19 +0100 Message-ID: Subject: Re: How does the Active MQ perform search in the messages for the given MESSAGE_SELECTOR? 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 selectors work on any message property. have a peek at the tests: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/selector/SelectorTest.java?view=markup and http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/JmsTopicSelectorTest.java?view=markup to see examples of the the syntax. selectors work in the same manner for browsers. The only thing to note is that selectors are run in memory, so you may need to configure a large maxPageSize via a destination policy entry if you have sparse selectors as the maxPageSize determines how many messages are retained in memory pending dispatch, An alternative to selectors is to use virtual destinations such that selected messages are redirected to their own destination. On 10 April 2012 11:13, sreekar wrote: > Hi Guys, > > I need to get the messages from one ActiveMQ Queue. > Going throught the documentation, found that Message_Selectors might be > helpful. > > But i did not see any doc explaining the mechanism of filtering the > messages. > > My doubt is how do i query for a specific message with some correlationID > (say :1789) > > consumer = session->createConsumer (MY_QUEUE, "1789"); > or > consumer = session->createConsumer (MY_QUEUE, "correlationId=1789"); > > How does the filtering happen ? > > Will it (message-selector) search only in the content (i.e body of the > message) or will it also search in the properties set by the user (set using > setStringProperty(), setIntProperty()...etc) ? > > > Are there any examples showing the usage of ActiveMQQueueBrowser ? > > Any help would be appreciable. > > Thanks & Regards, > Sreekar > > -- > View this message in context: http://activemq.2283324.n4.nabble.com/How-does-the-Active-MQ-perform-search-in-the-messages-for-the-given-MESSAGE-SELECTOR-tp4545137p4545137.html > Sent from the ActiveMQ - User mailing list archive at Nabble.com. -- http://fusesource.com http://blog.garytully.com