You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "badams (JIRA)" <ji...@apache.org> on 2012/08/15 20:17:37 UTC

[jira] [Created] (AMQ-3977) receiveNoWait returns NULL when attempting to receive message from Virtual Topic

badams created AMQ-3977:
---------------------------

             Summary: 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

        

[jira] [Commented] (AMQ-3977) receiveNoWait returns NULL when attempting to receive message from Virtual Topic

Posted by "badams (JIRA)" <ji...@apache.org>.
    [ 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

        

[jira] [Commented] (AMQ-3977) receiveNoWait returns NULL when attempting to receive message from Virtual Topic

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
    [ 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

        

[jira] [Closed] (AMQ-3977) receiveNoWait returns NULL when attempting to receive message from Virtual Topic

Posted by "badams (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AMQ-3977?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

badams closed AMQ-3977.
-----------------------

    Resolution: Not 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

        

[jira] [Commented] (AMQ-3977) receiveNoWait returns NULL when attempting to receive message from Virtual Topic

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
    [ 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

        

[jira] [Commented] (AMQ-3977) receiveNoWait returns NULL when attempting to receive message from Virtual Topic

Posted by "badams (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AMQ-3977?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13435955#comment-13435955 ] 

badams commented on AMQ-3977:
-----------------------------

You are correct. I wasn't aware of the prefetch configuration. Closing this issue, thanks Tim.
                
> 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