You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "ying (JIRA)" <ji...@apache.org> on 2009/07/09 19:41:06 UTC

[jira] Created: (AMQ-2323) purge in jconsole failed

purge in jconsole failed
------------------------

                 Key: AMQ-2323
                 URL: https://issues.apache.org/activemq/browse/AMQ-2323
             Project: ActiveMQ
          Issue Type: Bug
            Reporter: ying


using queue purge in jconsole will create infinite loop because incorrect Statistics whole loop

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


[jira] Updated: (AMQ-2323) purge in jconsole failed

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

ying updated AMQ-2323:
----------------------

    Attachment: AMQ-2323.patch

> purge in jconsole failed
> ------------------------
>
>                 Key: AMQ-2323
>                 URL: https://issues.apache.org/activemq/browse/AMQ-2323
>             Project: ActiveMQ
>          Issue Type: Bug
>            Reporter: ying
>         Attachments: AMQ-2323.patch
>
>
> using queue purge in jconsole will create infinite loop because incorrect Statistics whole loop

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


[jira] Resolved: (AMQ-2323) purge in jconsole failed

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

Dejan Bosanac resolved AMQ-2323.
--------------------------------

    Fix Version/s: 5.4.0
       Resolution: Fixed

Resolved with svn revisions 936798 and 936811. These are two separated issues. 936798 solves the purge problem when message count doesn't match queue stats. Giampaolo's test reveal the other issue and that is duplicate destinations in composite which causes this mismatch. 936811 solves this by preventing that duplicate messages are sent in this case.

> purge in jconsole failed
> ------------------------
>
>                 Key: AMQ-2323
>                 URL: https://issues.apache.org/activemq/browse/AMQ-2323
>             Project: ActiveMQ
>          Issue Type: Bug
>            Reporter: ying
>            Assignee: Dejan Bosanac
>             Fix For: 5.4.0
>
>         Attachments: AMQ-2323.patch
>
>
> using queue purge in jconsole will create infinite loop because incorrect Statistics whole loop

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


[jira] Commented: (AMQ-2323) purge in jconsole failed

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

Giampaolo Tranchida commented on AMQ-2323:
------------------------------------------

This issue can be reproduce easly sending message to a duplicate composite destination.
In the test case, 100 messages are really in the queue but the queueSize indicate 200.
Purge cause infinite loop.

{code}
public class SendDuplicateMessage {

    public static void main(String[] args) {

        ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory("smx", "smx", "tcp://localhost:50910");
        PooledConnectionFactory pool = new PooledConnectionFactory();
        pool.setConnectionFactory(cf);
        pool.start();

        JmsTemplate jt = new JmsTemplate(pool);

        StringBuffer text = new StringBuffer();
        for (int n=0; n<1000; n++) {
            text.append("0123456789");
        }

        final String body = text.toString();

        for (int i=0; i<100; i++) {
            final String messageNo = "message #" + i;
            System.out.println(messageNo);
            jt.send("testQueue,testQueue", new MessageCreator() {
                public Message createMessage(Session session) throws JMSException {
                    TextMessage m = session.createTextMessage();
                    m.setText(body);
                    m.setStringProperty("info", messageNo);
                    return m;
                }
            });
        }
        pool.stop();
    }

}

{code}

> purge in jconsole failed
> ------------------------
>
>                 Key: AMQ-2323
>                 URL: https://issues.apache.org/activemq/browse/AMQ-2323
>             Project: ActiveMQ
>          Issue Type: Bug
>            Reporter: ying
>         Attachments: AMQ-2323.patch
>
>
> using queue purge in jconsole will create infinite loop because incorrect Statistics whole loop

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


[jira] Assigned: (AMQ-2323) purge in jconsole failed

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

Dejan Bosanac reassigned AMQ-2323:
----------------------------------

    Assignee: Dejan Bosanac

> purge in jconsole failed
> ------------------------
>
>                 Key: AMQ-2323
>                 URL: https://issues.apache.org/activemq/browse/AMQ-2323
>             Project: ActiveMQ
>          Issue Type: Bug
>            Reporter: ying
>            Assignee: Dejan Bosanac
>         Attachments: AMQ-2323.patch
>
>
> using queue purge in jconsole will create infinite loop because incorrect Statistics whole loop

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


[jira] Commented: (AMQ-2323) purge in jconsole failed

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

Gary Tully commented on AMQ-2323:
---------------------------------

do you have any test code that can reproduce this issue? Wonder what causes the stats to become invalid?

> purge in jconsole failed
> ------------------------
>
>                 Key: AMQ-2323
>                 URL: https://issues.apache.org/activemq/browse/AMQ-2323
>             Project: ActiveMQ
>          Issue Type: Bug
>            Reporter: ying
>         Attachments: AMQ-2323.patch
>
>
> using queue purge in jconsole will create infinite loop because incorrect Statistics whole loop

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


[jira] Commented: (AMQ-2323) purge in jconsole failed

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

ying commented on AMQ-2323:
---------------------------

hi, usually if you do resetStatistics in jconsole, later the queueSize will be unreliable. then purge will cause issue most of the time. It happened a while ago for us. I remembered if you don't do resetStatistics, it will also happen very often if you do purge in jconsole when the broker is actively serving msgs.

> purge in jconsole failed
> ------------------------
>
>                 Key: AMQ-2323
>                 URL: https://issues.apache.org/activemq/browse/AMQ-2323
>             Project: ActiveMQ
>          Issue Type: Bug
>            Reporter: ying
>         Attachments: AMQ-2323.patch
>
>
> using queue purge in jconsole will create infinite loop because incorrect Statistics whole loop

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