You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by rodih <ro...@gmail.com> on 2008/09/01 15:47:38 UTC

Setting a consumer with selector on a queue - Messages not found

Hi,
I set a selector on a property and creates a consumer with that selector on
a Queue destination.

when I browse to check if a message exist with QueueBrowser the message is
found as expected.
But...When I try to recieve the message with the same selector the message
is not retrieved. 
Why is that?

Im doing something wrong as when I'm not setting any selector on the
consumer I dont get messages as expected as well.

To make things a bit more strange (for me) sometimes the consumer recieves
the message and sometimes not.
http://www.nabble.com/file/p19255012/someCode.txt someCode.txt 
Some code is attached in a file.

Thanks
Rodih
-- 
View this message in context: http://www.nabble.com/Setting-a-consumer-with-selector-on-a-queue---Messages-not-found-tp19255012p19255012.html
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.


Re: Setting a consumer with selector on a queue - Messages not found

Posted by rodih <ro...@gmail.com>.
OK The following link solved the problem.
http://activemq.apache.org/i-do-not-receive-messages-in-my-second-consumer.html

Im now closing explicitly the consumers.

Thanks!

Rodih



James.Strachan wrote:
> 
> 2008/9/1 rodih <ro...@gmail.com>:
>>
>> Hi,
>> I set a selector on a property and creates a consumer with that selector
>> on
>> a Queue destination.
>>
>> when I browse to check if a message exist with QueueBrowser the message
>> is
>> found as expected.
>> But...When I try to recieve the message with the same selector the
>> message
>> is not retrieved.
>> Why is that?
>>
>> Im doing something wrong as when I'm not setting any selector on the
>> consumer I dont get messages as expected as well.
>>
>> To make things a bit more strange (for me) sometimes the consumer
>> recieves
>> the message and sometimes not.
>> http://www.nabble.com/file/p19255012/someCode.txt someCode.txt
>> Some code is attached in a file.
> 
> Are you hitting either of these FAQ entries?
> http://activemq.apache.org/i-am-not-receiving-any-messages-what-is-wrong.html
> http://activemq.apache.org/i-do-not-receive-messages-in-my-second-consumer.html
> 
> here's how to get better help
> http://activemq.apache.org/support.html
> 
> 
> -- 
> James
> -------
> http://macstrac.blogspot.com/
> 
> Open Source Integration
> http://open.iona.com
> 
> 

-- 
View this message in context: http://www.nabble.com/Setting-a-consumer-with-selector-on-a-queue---Messages-not-found-tp19255012p19256418.html
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.


Re: Setting a consumer with selector on a queue - Messages not found

Posted by James Strachan <ja...@gmail.com>.
2008/9/1 rodih <ro...@gmail.com>:
>
> Hi,
> I set a selector on a property and creates a consumer with that selector on
> a Queue destination.
>
> when I browse to check if a message exist with QueueBrowser the message is
> found as expected.
> But...When I try to recieve the message with the same selector the message
> is not retrieved.
> Why is that?
>
> Im doing something wrong as when I'm not setting any selector on the
> consumer I dont get messages as expected as well.
>
> To make things a bit more strange (for me) sometimes the consumer recieves
> the message and sometimes not.
> http://www.nabble.com/file/p19255012/someCode.txt someCode.txt
> Some code is attached in a file.

Are you hitting either of these FAQ entries?
http://activemq.apache.org/i-am-not-receiving-any-messages-what-is-wrong.html
http://activemq.apache.org/i-do-not-receive-messages-in-my-second-consumer.html

here's how to get better help
http://activemq.apache.org/support.html


-- 
James
-------
http://macstrac.blogspot.com/

Open Source Integration
http://open.iona.com

Re: Setting a consumer with selector on a queue - Messages not found

Posted by rodih <ro...@gmail.com>.
I just saw that if the next message waiting is not stands in the selector
rule then  there will not be a recieve.
Is it true? If so can this issue may be elaborated a bit. 

Thanks,
Rodih



rodih wrote:
> 
> Hi,
> I set a selector on a property and creates a consumer with that selector
> on a Queue destination.
> 
> when I browse to check if a message exist with QueueBrowser the message is
> found as expected.
> But...When I try to recieve the message with the same selector the message
> is not retrieved. 
> Why is that?
> 
> Im doing something wrong as when I'm not setting any selector on the
> consumer I dont get messages as expected as well.
> 
> To make things a bit more strange (for me) sometimes the consumer recieves
> the message and sometimes not.
>  http://www.nabble.com/file/p19255012/someCode.txt someCode.txt 
> Some code is attached in a file.
> 
> Thanks
> Rodih
> 

-- 
View this message in context: http://www.nabble.com/Setting-a-consumer-with-selector-on-a-queue---Messages-not-found-tp19255012p19255135.html
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.