You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Michael Lok (JIRA)" <ji...@apache.org> on 2010/07/15 10:21:51 UTC

[jira] Created: (AMQ-2827) Intermittent 204 response using REST

Intermittent 204 response using REST
------------------------------------

                 Key: AMQ-2827
                 URL: https://issues.apache.org/activemq/browse/AMQ-2827
             Project: ActiveMQ
          Issue Type: Bug
    Affects Versions: 5.4.0
         Environment: Linux
JDK5
            Reporter: Michael Lok


Was able to successfully send 20 messages to AMQ via REST.  I can see that the messages were consumed and there are 20 messages in the response queue.  However, when reading the response queue using selector via REST, it intermittently returns HTTP code 204.  By looking at the "Active Consumers" for the response queue, I can see that the specific message has been dispatched to the consumer as the "Enqueues", "Dequeues" and "Dispatched" values are set to 1.

The server has been configured with consumer.prefetchSize=1.



-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (AMQ-2827) Intermittent 204 response using REST

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

Michael Lok updated AMQ-2827:
-----------------------------

    Description: 
Was able to successfully send 20 messages to AMQ via REST.  I can see that the messages were consumed and there are 20 messages in the response queue.  However, when reading the response queue using selector via REST, it intermittently returns HTTP code 204.  By looking at the "Active Consumers" for the response queue, I can see that the specific message has been dispatched to the consumer as the "Enqueues", "Dequeues" and "Dispatched" values are set to 1.

The server has been configured with consumer.prefetchSize=1.

I've further tried reproducing the problem by setting consumer.prefetchSize=0.  When I get a 204 response, I can see that the message is in the outgoing queue.  But executing another GET with the same Correlation ID will hang the client even though readTimeout is set.

This has been tested with 5.4-SNAPSHOT 15-July.



  was:
Was able to successfully send 20 messages to AMQ via REST.  I can see that the messages were consumed and there are 20 messages in the response queue.  However, when reading the response queue using selector via REST, it intermittently returns HTTP code 204.  By looking at the "Active Consumers" for the response queue, I can see that the specific message has been dispatched to the consumer as the "Enqueues", "Dequeues" and "Dispatched" values are set to 1.

The server has been configured with consumer.prefetchSize=1.

I've further tried reproducing the problem by setting consumer.prefetchSize=0.  When I get a 204 response, I can see that the message is in the outgoing queue.  But executing another GET with the same Correlation ID will hang the client even though readTimeout is set.




> Intermittent 204 response using REST
> ------------------------------------
>
>                 Key: AMQ-2827
>                 URL: https://issues.apache.org/activemq/browse/AMQ-2827
>             Project: ActiveMQ
>          Issue Type: Bug
>    Affects Versions: 5.4.0
>         Environment: Linux
> JDK5
>            Reporter: Michael Lok
>         Attachments: restclient.java
>
>
> Was able to successfully send 20 messages to AMQ via REST.  I can see that the messages were consumed and there are 20 messages in the response queue.  However, when reading the response queue using selector via REST, it intermittently returns HTTP code 204.  By looking at the "Active Consumers" for the response queue, I can see that the specific message has been dispatched to the consumer as the "Enqueues", "Dequeues" and "Dispatched" values are set to 1.
> The server has been configured with consumer.prefetchSize=1.
> I've further tried reproducing the problem by setting consumer.prefetchSize=0.  When I get a 204 response, I can see that the message is in the outgoing queue.  But executing another GET with the same Correlation ID will hang the client even though readTimeout is set.
> This has been tested with 5.4-SNAPSHOT 15-July.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (AMQ-2827) Intermittent 204 response using REST

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

Michael Lok updated AMQ-2827:
-----------------------------

    Attachment: MQRESTClient.java

New class file with proper send and get methods.

> Intermittent 204 response using REST
> ------------------------------------
>
>                 Key: AMQ-2827
>                 URL: https://issues.apache.org/activemq/browse/AMQ-2827
>             Project: ActiveMQ
>          Issue Type: Bug
>    Affects Versions: 5.4.0
>         Environment: Linux
> JDK5
>            Reporter: Michael Lok
>         Attachments: MQRESTClient.java, restclient.java
>
>
> Was able to successfully send 20 messages to AMQ via REST.  I can see that the messages were consumed and there are 20 messages in the response queue.  However, when reading the response queue using selector via REST, it intermittently returns HTTP code 204.  By looking at the "Active Consumers" for the response queue, I can see that the specific message has been dispatched to the consumer as the "Enqueues", "Dequeues" and "Dispatched" values are set to 1.
> The server has been configured with consumer.prefetchSize=1.
> I've further tried reproducing the problem by setting consumer.prefetchSize=0.  When I get a 204 response, I can see that the message is in the outgoing queue.  But executing another GET with the same Correlation ID will hang the client even though readTimeout is set.
> This has been tested with 5.4-SNAPSHOT 15-July.
> Update 23 July:
> Tried using the following settings:
> - removed consumer.prefetchSize in web.xml
> - saved session cookie for requests
> - used the "selector" HTTP header
> - used a random value for clientId in each request
> It seems to be returning all messages in properly.  However, each request generates a new client session based on the selector header.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (AMQ-2827) Intermittent 204 response using REST

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

Michael Lok updated AMQ-2827:
-----------------------------

    Description: 
Was able to successfully send 20 messages to AMQ via REST.  I can see that the messages were consumed and there are 20 messages in the response queue.  However, when reading the response queue using selector via REST, it intermittently returns HTTP code 204.  By looking at the "Active Consumers" for the response queue, I can see that the specific message has been dispatched to the consumer as the "Enqueues", "Dequeues" and "Dispatched" values are set to 1.

The server has been configured with consumer.prefetchSize=1.

I've further tried reproducing the problem by setting consumer.prefetchSize=0.  When I get a 204 response, I can see that the message is in the outgoing queue.  But executing another GET with the same Correlation ID will hang the client even though readTimeout is set.

This has been tested with 5.4-SNAPSHOT 15-July.

Update 23 July:

Tried using the following settings:

- removed consumer.prefetchSize in web.xml
- saved session cookie for requests
- used the "selector" HTTP header
- used a random value for clientId in each request

It seems to be returning all messages in properly.  However, each request generates a new client session based on the selector header.



  was:
Was able to successfully send 20 messages to AMQ via REST.  I can see that the messages were consumed and there are 20 messages in the response queue.  However, when reading the response queue using selector via REST, it intermittently returns HTTP code 204.  By looking at the "Active Consumers" for the response queue, I can see that the specific message has been dispatched to the consumer as the "Enqueues", "Dequeues" and "Dispatched" values are set to 1.

The server has been configured with consumer.prefetchSize=1.

I've further tried reproducing the problem by setting consumer.prefetchSize=0.  When I get a 204 response, I can see that the message is in the outgoing queue.  But executing another GET with the same Correlation ID will hang the client even though readTimeout is set.

This has been tested with 5.4-SNAPSHOT 15-July.




> Intermittent 204 response using REST
> ------------------------------------
>
>                 Key: AMQ-2827
>                 URL: https://issues.apache.org/activemq/browse/AMQ-2827
>             Project: ActiveMQ
>          Issue Type: Bug
>    Affects Versions: 5.4.0
>         Environment: Linux
> JDK5
>            Reporter: Michael Lok
>         Attachments: restclient.java
>
>
> Was able to successfully send 20 messages to AMQ via REST.  I can see that the messages were consumed and there are 20 messages in the response queue.  However, when reading the response queue using selector via REST, it intermittently returns HTTP code 204.  By looking at the "Active Consumers" for the response queue, I can see that the specific message has been dispatched to the consumer as the "Enqueues", "Dequeues" and "Dispatched" values are set to 1.
> The server has been configured with consumer.prefetchSize=1.
> I've further tried reproducing the problem by setting consumer.prefetchSize=0.  When I get a 204 response, I can see that the message is in the outgoing queue.  But executing another GET with the same Correlation ID will hang the client even though readTimeout is set.
> This has been tested with 5.4-SNAPSHOT 15-July.
> Update 23 July:
> Tried using the following settings:
> - removed consumer.prefetchSize in web.xml
> - saved session cookie for requests
> - used the "selector" HTTP header
> - used a random value for clientId in each request
> It seems to be returning all messages in properly.  However, each request generates a new client session based on the selector header.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (AMQ-2827) Intermittent 204 response using REST

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

Michael Lok updated AMQ-2827:
-----------------------------

    Description: 
Was able to successfully send 20 messages to AMQ via REST.  I can see that the messages were consumed and there are 20 messages in the response queue.  However, when reading the response queue using selector via REST, it intermittently returns HTTP code 204.  By looking at the "Active Consumers" for the response queue, I can see that the specific message has been dispatched to the consumer as the "Enqueues", "Dequeues" and "Dispatched" values are set to 1.

The server has been configured with consumer.prefetchSize=1.

I've further tried reproducing the problem by setting consumer.prefetchSize=0.  When I get a 204 response, I can see that the message is in the outgoing queue.  But executing another GET with the same Correlation ID will hang the client even though readTimeout is set.



  was:
Was able to successfully send 20 messages to AMQ via REST.  I can see that the messages were consumed and there are 20 messages in the response queue.  However, when reading the response queue using selector via REST, it intermittently returns HTTP code 204.  By looking at the "Active Consumers" for the response queue, I can see that the specific message has been dispatched to the consumer as the "Enqueues", "Dequeues" and "Dispatched" values are set to 1.

The server has been configured with consumer.prefetchSize=1.




> Intermittent 204 response using REST
> ------------------------------------
>
>                 Key: AMQ-2827
>                 URL: https://issues.apache.org/activemq/browse/AMQ-2827
>             Project: ActiveMQ
>          Issue Type: Bug
>    Affects Versions: 5.4.0
>         Environment: Linux
> JDK5
>            Reporter: Michael Lok
>         Attachments: restclient.java
>
>
> Was able to successfully send 20 messages to AMQ via REST.  I can see that the messages were consumed and there are 20 messages in the response queue.  However, when reading the response queue using selector via REST, it intermittently returns HTTP code 204.  By looking at the "Active Consumers" for the response queue, I can see that the specific message has been dispatched to the consumer as the "Enqueues", "Dequeues" and "Dispatched" values are set to 1.
> The server has been configured with consumer.prefetchSize=1.
> I've further tried reproducing the problem by setting consumer.prefetchSize=0.  When I get a 204 response, I can see that the message is in the outgoing queue.  But executing another GET with the same Correlation ID will hang the client even though readTimeout is set.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Issue Comment Edited: (AMQ-2827) Intermittent 204 response using REST

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

Michael Lok edited comment on AMQ-2827 at 7/23/10 11:07 PM:
------------------------------------------------------------

New class file with proper send and get methods.  Change the URLs to the proper ones.  This version saves server session cookies.  But in actual implementation, I'm not able to save server session cookies.

      was (Author: lokem):
    New class file with proper send and get methods.
  
> Intermittent 204 response using REST
> ------------------------------------
>
>                 Key: AMQ-2827
>                 URL: https://issues.apache.org/activemq/browse/AMQ-2827
>             Project: ActiveMQ
>          Issue Type: Bug
>    Affects Versions: 5.4.0
>         Environment: Linux
> JDK5
>            Reporter: Michael Lok
>         Attachments: MQRESTClient.java, restclient.java
>
>
> Was able to successfully send 20 messages to AMQ via REST.  I can see that the messages were consumed and there are 20 messages in the response queue.  However, when reading the response queue using selector via REST, it intermittently returns HTTP code 204.  By looking at the "Active Consumers" for the response queue, I can see that the specific message has been dispatched to the consumer as the "Enqueues", "Dequeues" and "Dispatched" values are set to 1.
> The server has been configured with consumer.prefetchSize=1.
> I've further tried reproducing the problem by setting consumer.prefetchSize=0.  When I get a 204 response, I can see that the message is in the outgoing queue.  But executing another GET with the same Correlation ID will hang the client even though readTimeout is set.
> This has been tested with 5.4-SNAPSHOT 15-July.
> Update 23 July:
> Tried using the following settings:
> - removed consumer.prefetchSize in web.xml
> - saved session cookie for requests
> - used the "selector" HTTP header
> - used a random value for clientId in each request
> It seems to be returning all messages in properly.  However, each request generates a new client session based on the selector header.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (AMQ-2827) Intermittent 204 response using REST

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

Michael Lok updated AMQ-2827:
-----------------------------

    Attachment: restclient.java

> Intermittent 204 response using REST
> ------------------------------------
>
>                 Key: AMQ-2827
>                 URL: https://issues.apache.org/activemq/browse/AMQ-2827
>             Project: ActiveMQ
>          Issue Type: Bug
>    Affects Versions: 5.4.0
>         Environment: Linux
> JDK5
>            Reporter: Michael Lok
>         Attachments: restclient.java
>
>
> Was able to successfully send 20 messages to AMQ via REST.  I can see that the messages were consumed and there are 20 messages in the response queue.  However, when reading the response queue using selector via REST, it intermittently returns HTTP code 204.  By looking at the "Active Consumers" for the response queue, I can see that the specific message has been dispatched to the consumer as the "Enqueues", "Dequeues" and "Dispatched" values are set to 1.
> The server has been configured with consumer.prefetchSize=1.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQ-2827) Intermittent 204 response using REST

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

Dejan Bosanac commented on AMQ-2827:
------------------------------------

The attached client does not reproduces the issue as it missed the part that is putting messages in the response queue. Can you create a test that can be used to reproduce the issue you're seeing?

> Intermittent 204 response using REST
> ------------------------------------
>
>                 Key: AMQ-2827
>                 URL: https://issues.apache.org/activemq/browse/AMQ-2827
>             Project: ActiveMQ
>          Issue Type: Bug
>    Affects Versions: 5.4.0
>         Environment: Linux
> JDK5
>            Reporter: Michael Lok
>         Attachments: restclient.java
>
>
> Was able to successfully send 20 messages to AMQ via REST.  I can see that the messages were consumed and there are 20 messages in the response queue.  However, when reading the response queue using selector via REST, it intermittently returns HTTP code 204.  By looking at the "Active Consumers" for the response queue, I can see that the specific message has been dispatched to the consumer as the "Enqueues", "Dequeues" and "Dispatched" values are set to 1.
> The server has been configured with consumer.prefetchSize=1.
> I've further tried reproducing the problem by setting consumer.prefetchSize=0.  When I get a 204 response, I can see that the message is in the outgoing queue.  But executing another GET with the same Correlation ID will hang the client even though readTimeout is set.
> This has been tested with 5.4-SNAPSHOT 15-July.
> Update 23 July:
> Tried using the following settings:
> - removed consumer.prefetchSize in web.xml
> - saved session cookie for requests
> - used the "selector" HTTP header
> - used a random value for clientId in each request
> It seems to be returning all messages in properly.  However, each request generates a new client session based on the selector header.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (AMQ-2827) Intermittent 204 response using REST

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

Dejan Bosanac resolved AMQ-2827.
--------------------------------

      Assignee: Dejan Bosanac
    Resolution: Working as Designed

I added a test case that confirms that this scenario works fine. take a look at testCorrelation() in RestTest

https://svn.apache.org/repos/asf/activemq/trunk/activemq-web-demo/src/test/java/org/apache/activemq/web/RestTest.java

Also note, that you need to set clientId on your GET url in order to use the same consumer every time and get all messages.

> Intermittent 204 response using REST
> ------------------------------------
>
>                 Key: AMQ-2827
>                 URL: https://issues.apache.org/activemq/browse/AMQ-2827
>             Project: ActiveMQ
>          Issue Type: Bug
>    Affects Versions: 5.4.0
>         Environment: Linux
> JDK5
>            Reporter: Michael Lok
>            Assignee: Dejan Bosanac
>         Attachments: MQRESTClient.java, restclient.java
>
>
> Was able to successfully send 20 messages to AMQ via REST.  I can see that the messages were consumed and there are 20 messages in the response queue.  However, when reading the response queue using selector via REST, it intermittently returns HTTP code 204.  By looking at the "Active Consumers" for the response queue, I can see that the specific message has been dispatched to the consumer as the "Enqueues", "Dequeues" and "Dispatched" values are set to 1.
> The server has been configured with consumer.prefetchSize=1.
> I've further tried reproducing the problem by setting consumer.prefetchSize=0.  When I get a 204 response, I can see that the message is in the outgoing queue.  But executing another GET with the same Correlation ID will hang the client even though readTimeout is set.
> This has been tested with 5.4-SNAPSHOT 15-July.
> Update 23 July:
> Tried using the following settings:
> - removed consumer.prefetchSize in web.xml
> - saved session cookie for requests
> - used the "selector" HTTP header
> - used a random value for clientId in each request
> It seems to be returning all messages in properly.  However, each request generates a new client session based on the selector header.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.