You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Giampaolo Tranchida (JIRA)" <ji...@apache.org> on 2010/04/21 16:39:18 UTC
[jira] Commented: (AMQ-2323) purge in jconsole failed
[ 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.