activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adrian Co <...@exist.com>
Subject Re: QueueBrowser in embedded broker not getting any messages
Date Tue, 21 Nov 2006 19:06:53 GMT
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,
>>     
>
>   


Mime
View raw message