Thanks!  That worked for me.

Chetan Sarva-2 wrote:
> 
> After creating the queue or topic with createQueue(name) or
> createTopic(name), you can specify the selector using createConsumer(name,
> selector). Here's the method signature (from the 3.0 library):
> 
>         virtual MessageConsumer* createConsumer(
>             const Destination* destination,
>             const std::string& selector )
> 
> On Tue, Jun 23, 2009 at 12:18 PM, Stephen Pietrowicz
> <s...@ncsa.uiuc.edu>wrote:
> 
>>
>> Hi,
>>
>> What's the right way to specify a consumer selector using ActiveMQ cpp?
>>
>> I tried:
>>
>> _destination = _session->createTopic( topicName+"?consumer.selector='info
>> =
>> "+_info+"'");
>>
>> and got the error
>>
>> URISupport::parseQuery - Invalid URI Option.
>>        FILE: activemq/util/URISupport.cpp, LINE: 141
>>        FILE: activemq/util/URISupport.cpp, LINE: 159
>>        FILE: activemq/connector/openwire/OpenWireConnector.cpp, LINE: 665
>>        FILE: activemq/core/ActiveMQSession.cpp, LINE: 421
>>
>>
>> and when I tried:
>>
>> _destination = _session->createTopic(
>> topicName+"?consumer.selector=info%D"+_info);
>>
>>
>> I got a server side error... when I went to look at it, the log said:
>>
>> javax.jms.InvalidSelectorException: info%3Dfred100
>>        at
>> org.apache.activemq.selector.SelectorParser.parse(SelectorParser.java:46)
>>        [ stuff deleted ]
>>
>> I tried looking for an example that uses ActiveMQCPP, but couldn't find
>> one.
>>
>> Any help would be appreciated!
>>
>> Steve
>> --
>> View this message in context:
>> http://www.nabble.com/activemqcpp-and-consumer.selector-tp24167358p24167358.html
>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/activemqcpp-and-consumer.selector-tp24167358p24173365.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Reply via email to