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

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

There's no guarantees with receiveNoWait, if the message is still enroute to 
the client and you call receiveNoWait you'll get a null back.  The fact that a 
timed receive call does get the message further indicates that the message 
simply hasn't arrived at the client.  If you really think there's an issue then 
I suggest creating a JUnit test case to reproduce it, however anytime you use 
receiveNoWait you need to code with the expectation that you could get a null 
return.
                
> 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