You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Stephen Pietrowicz <sr...@ncsa.uiuc.edu> on 2009/06/23 18:18:00 UTC
activemqcpp and consumer.selector
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.
Re: activemqcpp and consumer.selector
Posted by Stephen Pietrowicz <sr...@ncsa.uiuc.edu>.
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
> <sr...@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.
Re: activemqcpp and consumer.selector
Posted by Chetan Sarva <ch...@milabra.com>.
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 <sr...@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.
>
>