[
https://issues.apache.org/jira/browse/AMQ-3977?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13435630#comment-13435630
]
badams commented on AMQ-3977:
-----------------------------
If the message has been enqueued on the broker, I don't see how receiveNoWait()
would return null. I'm guessing the receiveNoWait code *should* first perform a
check to determine if there is a message waiting to be dequeued, if so return
the msg, if not return null. I found an older ticket that had this exact same
problem in a 4.x version. Perhaps something was reintroduced.
> 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