activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Priya Parvatikar <priya.parvati...@ingenta.com>
Subject Re: QueueBrowser in embedded broker not getting any messages
Date Wed, 22 Nov 2006 05:00:17 GMT

Hi Adrian,

Thanks for this,  I changed the code to create the browser just at the time
I am about to query for the messages and it now works for me.  

Thanks for all the help.
Priya



Adrian Co wrote:
> 
> Hi,
> 
> The current behavior of ActiveMQ is that a queue browser can only browse 
> messages that are available when it is created and not when 
> getEnumeration is called.
> 
> Priya Parvatikar wrote:
>> Hi Adrian,
>>
>>   
>>> Does using an actual consumer instead of a queue browser works?
>>>     
>>
>> I tried using a MessageConsumer instead of a QueueBrowser and the
>> consumer
>> got the message as expected
>>
>> As suggested by Marlon, I have uploaded code for the browser itself and a
>> unit test for it and a few other supporting files
>>
>> The files are 
>>
>> 1)  http://www.nabble.com/file/4242/AQueueBrowser.java AQueueBrowser.java 
>> -
>> this contains the code for the QueueBrowser
>> 2)  http://www.nabble.com/file/4243/MockQueueMessageSender.java
>> MockQueueMessageSender.java  - this sends a message to a queue
>> 3)  http://www.nabble.com/file/4244/MockQueueConsumer.java
>> MockQueueConsumer.java  - this is a simple consumer that gets messages
>> from
>> the queue
>> 4)  http://www.nabble.com/file/4245/QueueBrowserTest.java
>> QueueBrowserTest.java  - a JUnit test that tests two cases -
>> sender+browser
>> and sender+consumer. The sender+consumer case works as expected, however
>> the
>> sender+browser doesn't. 
>>
>> Supporting files -  http://www.nabble.com/file/4246/GatewayException.java
>> GatewayException.java ,  http://www.nabble.com/file/4247/JNDIUtil.java
>> JNDIUtil.java ,  http://www.nabble.com/file/4248/jndi.properties
>> jndi.properties 
>>
>> Could you please have a look and let me know if there is something
>> incorrect
>> in the code? Please let me know if you need more information.
>>
>> Thanks for all your help,
>> Priya
>>
>>
>>
>> Try enabling JMX in your embedded broker and check if there are really 
>> messages being enqueued in the queue specified.
>>
>> Does using an actual consumer instead of a queue browser works?
>>
>> Priya Parvatikar wrote:
>>   
>>> Hi,
>>>     
>>
>>   
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/QueueBrowser-in-embedded-broker-not-getting-any-messages-tf2677079.html#a7485266
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message