Return-Path: Delivered-To: apmail-activemq-dev-archive@www.apache.org Received: (qmail 70891 invoked from network); 10 Sep 2007 10:49:47 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 10 Sep 2007 10:49:47 -0000 Received: (qmail 66369 invoked by uid 500); 10 Sep 2007 10:49:40 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 66344 invoked by uid 500); 10 Sep 2007 10:49:40 -0000 Mailing-List: contact dev-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list dev@activemq.apache.org Received: (qmail 66335 invoked by uid 99); 10 Sep 2007 10:49:39 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 10 Sep 2007 03:49:39 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 10 Sep 2007 10:51:15 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 5298471420C for ; Mon, 10 Sep 2007 03:49:23 -0700 (PDT) Message-ID: <5815891.1189421363335.JavaMail.jira@brutus> Date: Mon, 10 Sep 2007 03:49:23 -0700 (PDT) From: "StefanL (JIRA)" To: dev@activemq.apache.org Subject: [jira] Commented: (AMQNET-57) Selector string is not passed through when creating a consumer on a session. In-Reply-To: <33362612.1189198582177.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/activemq/browse/AMQNET-57?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_40114 ] StefanL commented on AMQNET-57: ------------------------------- I think that this is a duplicate of issue AMQNET-44. Please see my comment there that an empty/blank selector should not be passed to the jms broker. I suggest the following change to ActiveMQ.Session.CreateConsumerInfo (session.cs), remove: answer.Selector = selector; add: answer.Selector = String.IsNullOrEmpty(selector) ? null : selector; > Selector string is not passed through when creating a consumer on a session. > ---------------------------------------------------------------------------- > > Key: AMQNET-57 > URL: https://issues.apache.org/activemq/browse/AMQNET-57 > Project: ActiveMQ .Net > Issue Type: Bug > Components: ActiveMQ Client, MSMQ, Stomp > Environment: Windows XP SP2, .NET 2.0 > Reporter: Jim Gomes > Assignee: James Strachan > Priority: Critical > Original Estimate: 5 minutes > Remaining Estimate: 5 minutes > > The overloaded ISession.CreateConsumer() in ActiveMQ.Session does not pass through the selector string parameter. Even if the client supplies a selector string, a null string will be passed on to the overloaded worker function. Following is the erroneous code: > {code:title=Session.cs snippet [BROKEN CODE]|borderStyle=solid} > public IMessageConsumer CreateConsumer(IDestination destination, string selector) > { > return CreateConsumer(destination, null, false); > } > {code} > The fix is simple: > {code:title=Session.cs snippet [FIXED]|borderStyle=solid} > public IMessageConsumer CreateConsumer(IDestination destination, string selector) > { > return CreateConsumer(destination, selector, false); > } > {code} -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.