[ 
https://issues.apache.org/jira/browse/AMQ-3977?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13435949#comment-13435949
 ] 

Timothy Bish commented on AMQ-3977:
-----------------------------------

There's no round-tripping to the broker unless you have prefetch set to zero.  
The client just checks its local prefetch buffer and if a message is there its 
returned if not it returns null.  Depending on what prefetch you have set you 
can test this out by calling a Thread.sleep before doing a receiveNoWait and 
you should see similar behavior to the timed receive call you were doing.  I 
still don't see an issue here, please provide a test case if you think there's 
a problem.  
                
> receiveNoWait returns NULL when attempting to receive message from Virtual 
> Topic
> --------------------------------------------------------------------------------
>
>                 Key: AMQ-3977
>                 URL: https://issues.apache.org/jira/browse/AMQ-3977
>             Project: ActiveMQ
>          Issue Type: Bug
>    Affects Versions: 5.6.0
>         Environment: Windows
>            Reporter: badams
>
> Here are my steps that I performed:
> 1) Create Virtual Topic "VirtualTopic.Orders"
> 2) Create consumer "Consumer.A.VirtualTopic.Orders"
> 3) Publish persistent message to VirtualTopic.Orders (I see my message 
> enqueued on my Queue)
> 4) Attempt to synchronously read the message using the receiveNoWait() 
> method. This returns null.
> My current work around is using receive(timeout) method. This adds wasted 
> time on my server and should be fixed.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to