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