You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Aidan Skinner (JIRA)" <qp...@incubator.apache.org> on 2009/08/03 17:23:15 UTC

[jira] Created: (QPID-2018) Clear queue doesn't clear acquired messages which is a little confusing if that's all there is.

Clear queue doesn't clear acquired messages which is a little confusing if that's all there is.
-----------------------------------------------------------------------------------------------

                 Key: QPID-2018
                 URL: https://issues.apache.org/jira/browse/QPID-2018
             Project: Qpid
          Issue Type: Bug
          Components: Java Management : JMX Console
    Affects Versions: 0.6
            Reporter: Aidan Skinner
            Assignee: Robbie Gemmell
            Priority: Minor
             Fix For: 0.6


The clear queue button prompts but doesn't actually clear the queue. I suspect because all the messages have been acquired by consumers. This should probably display a better error message if there are acquired messages which can't be cleared. An int return of uncleared ones maybe?

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


---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


Re: [RFC] [Java] QPID-2018 Clear queue doesn't clear acquired messages which is a little confusing if that's all there is.

Posted by Aidan Skinner <ai...@gmail.com>.
On Sun, Aug 9, 2009 at 10:27 PM, Robbie Gemmell<ro...@gmail.com> wrote:

> That was my thinking too. Id have just done that, but since it is the
> opposite of your original suggestion I thought id ask first :)

I'd like to think I would have suggested this if I'd read the relevant
code first. ;)

- Aidan (who would also like a pony, and a puppy and..)

-- 
Apache Qpid - AMQP, JMS, other messaging love http://qpid.apache.org
"A witty saying proves nothing" - Voltaire

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


RE: [RFC] [Java] QPID-2018 Clear queue doesn't clear acquired messages which is a little confusing if that's all there is.

Posted by Robbie Gemmell <ro...@gmail.com>.
That was my thinking too. Id have just done that, but since it is the
opposite of your original suggestion I thought id ask first :)

Robbie

> -----Original Message-----
> From: Aidan Skinner [mailto:aidan.skinner@gmail.com]
> Sent: 09 August 2009 22:10
> To: dev@qpid.apache.org
> Subject: Re: [RFC] [Java] QPID-2018 Clear queue doesn't clear acquired
> messages which is a little confusing if that's all there is.
> 
> On Sun, Aug 9, 2009 at 9:41 PM, Robbie
> Gemmell<ro...@gmail.com> wrote:
> 
> > Checks for undeleted messages could be made using this number along
> with the before/after MessageCount, but of course general queue
> activity during the process could cause such a check to reach the wrong
> conclusion. In order to accurately report the number of messages not
> deleted due to being in an acquired state a new
> 'clearQueueAndReportNumAcquired' method would need to be added to
> (Simple)AMQQueue, does that seem ok to everyone? The only real
> alternative is to start using the return value of the existing method
> in the MBean and have the console indicate how many messages were
> deleted, rather than how many were not. Thoughts?
> 
> Reporting how many were deleted seems reasonable to me, I don't see
> much gain in introducing a new method to do something slightly
> different.
> 
> - Aidan
> 
> --
> Apache Qpid - AMQP, JMS, other messaging love http://qpid.apache.org
> "A witty saying proves nothing" - Voltaire
> 
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project:      http://qpid.apache.org
> Use/Interact: mailto:dev-subscribe@qpid.apache.org



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


Re: [RFC] [Java] QPID-2018 Clear queue doesn't clear acquired messages which is a little confusing if that's all there is.

Posted by Aidan Skinner <ai...@gmail.com>.
On Sun, Aug 9, 2009 at 9:41 PM, Robbie Gemmell<ro...@gmail.com> wrote:

> Checks for undeleted messages could be made using this number along with the before/after MessageCount, but of course general queue activity during the process could cause such a check to reach the wrong conclusion. In order to accurately report the number of messages not deleted due to being in an acquired state a new 'clearQueueAndReportNumAcquired' method would need to be added to (Simple)AMQQueue, does that seem ok to everyone? The only real alternative is to start using the return value of the existing method in the MBean and have the console indicate how many messages were deleted, rather than how many were not. Thoughts?

Reporting how many were deleted seems reasonable to me, I don't see
much gain in introducing a new method to do something slightly
different.

- Aidan

-- 
Apache Qpid - AMQP, JMS, other messaging love http://qpid.apache.org
"A witty saying proves nothing" - Voltaire

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


[RFC] [Java] QPID-2018 Clear queue doesn't clear acquired messages which is a little confusing if that's all there is.

Posted by Robbie Gemmell <ro...@gmail.com>.
The clearQueue method of (Simple)AMQQueue actually already returns a long indicating the number of messages deleted, but the AMQQueueMBean clearQueue() method ignores this and just has a void return value. The value is being used in the method response message of the QueuePurgeHandler to report the number of deleted messages, and presumably that needs to stay the way it is.

Checks for undeleted messages could be made using this number along with the before/after MessageCount, but of course general queue activity during the process could cause such a check to reach the wrong conclusion. In order to accurately report the number of messages not deleted due to being in an acquired state a new 'clearQueueAndReportNumAcquired' method would need to be added to (Simple)AMQQueue, does that seem ok to everyone? The only real alternative is to start using the return value of the existing method in the MBean and have the console indicate how many messages were deleted, rather than how many were not. Thoughts?

Robbie

> -----Original Message-----
> From: Aidan Skinner (JIRA) 
> Sent: 03 August 2009 16:23 
> 
> The clear queue button prompts but doesn't actually clear the queue. I
> suspect because all the messages have been acquired by consumers. This
> should probably display a better error message if there are acquired
> messages which can't be cleared. An int return of uncleared ones maybe?
> 



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


[jira] Updated: (QPID-2018) Clear queue doesn't clear acquired messages which is a little confusing if that's all there is.

Posted by "Robbie Gemmell (JIRA)" <qp...@incubator.apache.org>.
     [ https://issues.apache.org/jira/browse/QPID-2018?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Robbie Gemmell updated QPID-2018:
---------------------------------

          Component/s: Java Broker
    Affects Version/s:     (was: 0.6)
                       0.5
                       M2.1
                       M3
                       M4

> Clear queue doesn't clear acquired messages which is a little confusing if that's all there is.
> -----------------------------------------------------------------------------------------------
>
>                 Key: QPID-2018
>                 URL: https://issues.apache.org/jira/browse/QPID-2018
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Broker, Java Management : JMX Console
>    Affects Versions: M2.1, M3, M4, 0.5
>            Reporter: Aidan Skinner
>            Assignee: Robbie Gemmell
>            Priority: Minor
>             Fix For: 0.6
>
>
> The clear queue button prompts but doesn't actually clear the queue. I suspect because all the messages have been acquired by consumers. This should probably display a better error message if there are acquired messages which can't be cleared. An int return of uncleared ones maybe?

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


---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


[jira] Assigned: (QPID-2018) Clear queue doesn't clear acquired messages which is a little confusing if that's all there is.

Posted by "Robbie Gemmell (JIRA)" <qp...@incubator.apache.org>.
     [ https://issues.apache.org/jira/browse/QPID-2018?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Robbie Gemmell reassigned QPID-2018:
------------------------------------

    Assignee: Aidan Skinner  (was: Robbie Gemmell)

Hi Aidan, can you review this change please, thanks.

> Clear queue doesn't clear acquired messages which is a little confusing if that's all there is.
> -----------------------------------------------------------------------------------------------
>
>                 Key: QPID-2018
>                 URL: https://issues.apache.org/jira/browse/QPID-2018
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Broker, Java Management : JMX Console
>    Affects Versions: M2.1, M3, M4, 0.5
>            Reporter: Aidan Skinner
>            Assignee: Aidan Skinner
>            Priority: Minor
>             Fix For: 0.6
>
>
> The clear queue button prompts but doesn't actually clear the queue. I suspect because all the messages have been acquired by consumers. This should probably display a better error message if there are acquired messages which can't be cleared. An int return of uncleared ones maybe?

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


---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


[jira] Resolved: (QPID-2018) Clear queue doesn't clear acquired messages which is a little confusing if that's all there is.

Posted by "Aidan Skinner (JIRA)" <qp...@incubator.apache.org>.
     [ https://issues.apache.org/jira/browse/QPID-2018?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Aidan Skinner resolved QPID-2018.
---------------------------------

    Resolution: Fixed

> Clear queue doesn't clear acquired messages which is a little confusing if that's all there is.
> -----------------------------------------------------------------------------------------------
>
>                 Key: QPID-2018
>                 URL: https://issues.apache.org/jira/browse/QPID-2018
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Broker, Java Management : JMX Console
>    Affects Versions: M2.1, M3, M4, 0.5
>            Reporter: Aidan Skinner
>            Assignee: Aidan Skinner
>            Priority: Minor
>             Fix For: 0.6
>
>
> The clear queue button prompts but doesn't actually clear the queue. I suspect because all the messages have been acquired by consumers. This should probably display a better error message if there are acquired messages which can't be cleared. An int return of uncleared ones maybe?

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


---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


[jira] Updated: (QPID-2018) Clear queue doesn't clear acquired messages which is a little confusing if that's all there is.

Posted by "Robbie Gemmell (JIRA)" <qp...@incubator.apache.org>.
     [ https://issues.apache.org/jira/browse/QPID-2018?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Robbie Gemmell updated QPID-2018:
---------------------------------

    Status: Ready To Review  (was: In Progress)

> Clear queue doesn't clear acquired messages which is a little confusing if that's all there is.
> -----------------------------------------------------------------------------------------------
>
>                 Key: QPID-2018
>                 URL: https://issues.apache.org/jira/browse/QPID-2018
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Broker, Java Management : JMX Console
>    Affects Versions: M2.1, M3, M4, 0.5
>            Reporter: Aidan Skinner
>            Assignee: Robbie Gemmell
>            Priority: Minor
>             Fix For: 0.6
>
>
> The clear queue button prompts but doesn't actually clear the queue. I suspect because all the messages have been acquired by consumers. This should probably display a better error message if there are acquired messages which can't be cleared. An int return of uncleared ones maybe?

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


---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org