You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Jim Gomes (JIRA)" <ji...@apache.org> on 2007/09/07 22:56:22 UTC

[jira] Created: (AMQNET-57) Selector string is not passed through when creating a consumer on a session.

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


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.


[jira] Commented: (AMQNET-57) Selector string is not passed through when creating a consumer on a session.

Posted by "StefanL (JIRA)" <ji...@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.


[jira] Closed: (AMQNET-57) Selector string is not passed through when creating a consumer on a session.

Posted by "Jim Gomes (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQNET-57?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jim Gomes closed AMQNET-57.
---------------------------

    Resolution: Duplicate

> 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.


[jira] Commented: (AMQNET-57) Selector string is not passed through when creating a consumer on a session.

Posted by "Jim Gomes (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQNET-57?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_40115 ] 

Jim Gomes commented on AMQNET-57:
---------------------------------

Thanks for pointing that out.  I missed the original when I posted this issue.  I linked the two items together as AMQNET-57 being a duplicate of AMQNET-44.

> 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.