]
Joel Lindheimer updated JBMESSAGING-477:
----------------------------------------
Affects Version/s: 1.0.1.CR3
Messages are left in the Messages table after retry message is
printed and are retried every time the server is restarted
-------------------------------------------------------------------------------------------------------------------------
Key: JBMESSAGING-477
URL:
http://jira.jboss.com/jira/browse/JBMESSAGING-477
Project: JBoss Messaging
Issue Type: Bug
Components: Messaging Core
Affects Versions: 1.0.1.CR2, 1.0.1.CR3
Environment: Windows XP
Reporter: Joel Lindheimer
Assigned To: Ovidiu Feodorov
Fix For: 1.0.1.CR5
Attachments: TestConsumer.java, TestJMSClient.java
I am testing Consumer.receive() with a userTransaction rollback scenario; the messages
rollback and are retried. Eventually the follwoing message is printed:
JBossMessage[49410]:PERSISTENT has exceed maximum delivery attempts and will be removed.
However, the messages are never deleted from the messages table; it is therefore retried
upon every subsequent server restart.
To reproduce just send a simple message with a consumer that does the following:
while (true) {
log.warn("whileloop+");
ut = (UserTransaction)
getInitialContext().lookup("UserTransaction");
ut.begin();
conn = (QueueConnection) this.getQueueFactory().createQueueConnection();
conn.start();
session = conn.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
receiver = session.createReceiver(getQueue());
// Note: starting the ut here does causes other issues... so i moved it
up
// ut = (UserTransaction)
getInitialContext().lookup("UserTransaction");
// ut.begin();
TextMessage msg = (TextMessage) receiver.receive(5000);
receiver.close();
session.close();
conn.close();
log.warn("msg: " + msg);
if(msg!=null) {
log.warn("msg.text: " +msg.getText());
}
ut.rollback();
(...)
Here is the server console print:
12:41:30,946 WARN [TestConsumer] msg: null
12:41:30,946 WARN [TestConsumer] whileloop-
12:41:30,946 WARN [TestConsumer] whileloop+
12:41:30,946 WARN [TestConsumer] msg: delegator->JBossMessage[49410]:PERSISTENT
12:41:30,946 WARN [TestConsumer] msg.text: Payload #2
12:41:30,946 WARN [TestConsumer] whileloop-
12:41:30,946 WARN [TestConsumer] whileloop+
12:41:30,946 WARN [TestConsumer] msg: delegator->JBossMessage[49410]:PERSISTENT
12:41:30,946 WARN [TestConsumer] msg.text: Payload #2
12:41:30,946 WARN [TestConsumer] whileloop-
12:41:30,946 WARN [TestConsumer] whileloop+
12:41:30,962 WARN [TestConsumer] msg: delegator->JBossMessage[49410]:PERSISTENT
12:41:30,962 WARN [TestConsumer] msg.text: Payload #2
12:41:30,962 WARN [TestConsumer] whileloop-
12:41:30,962 WARN [TestConsumer] whileloop+
12:41:30,962 WARN [TestConsumer] msg: delegator->JBossMessage[49410]:PERSISTENT
12:41:30,962 WARN [TestConsumer] msg.text: Payload #2
12:41:30,962 WARN [TestConsumer] whileloop-
12:41:30,962 WARN [TestConsumer] whileloop+
12:41:30,962 WARN [TestConsumer] msg: delegator->JBossMessage[49410]:PERSISTENT
12:41:30,962 WARN [TestConsumer] msg.text: Payload #2
12:41:30,962 WARN [TestConsumer] whileloop-
12:41:30,962 WARN [TestConsumer] whileloop+
12:41:30,962 WARN [TestConsumer] msg: delegator->JBossMessage[49410]:PERSISTENT
12:41:30,962 WARN [TestConsumer] msg.text: Payload #2
12:41:30,962 WARN [TestConsumer] whileloop-
12:41:30,962 WARN [TestConsumer] whileloop+
12:41:30,977 WARN [TestConsumer] msg: delegator->JBossMessage[49410]:PERSISTENT
12:41:30,977 WARN [TestConsumer] msg.text: Payload #2
12:41:30,977 WARN [TestConsumer] whileloop-
12:41:30,977 WARN [TestConsumer] whileloop+
12:41:30,977 WARN [TestConsumer] msg: delegator->JBossMessage[49410]:PERSISTENT
12:41:30,977 WARN [TestConsumer] msg.text: Payload #2
12:41:30,977 WARN [TestConsumer] whileloop-
12:41:30,977 WARN [TestConsumer] whileloop+
12:41:31,009 WARN [TestConsumer] msg: delegator->JBossMessage[49410]:PERSISTENT
12:41:31,009 WARN [TestConsumer] msg.text: Payload #2
12:41:31,009 WARN [TestConsumer] whileloop-
12:41:31,009 WARN [TestConsumer] whileloop+
12:41:31,009 WARN [TestConsumer] msg: delegator->JBossMessage[49410]:PERSISTENT
12:41:31,009 WARN [TestConsumer] msg.text: Payload #2
12:41:31,009 WARN [TestConsumer] whileloop-
12:41:31,009 WARN [TestConsumer] whileloop+
12:41:31,024 WARN [TestConsumer] msg: delegator->JBossMessage[49410]:PERSISTENT
12:41:31,024 WARN [TestConsumer] msg.text: Payload #2
12:41:31,024 WARN [TestConsumer] whileloop-
12:41:31,024 WARN [TestConsumer] whileloop+
12:41:31,024 WARN [ServerConsumerEndpoint] JBossMessage[49410]:PERSISTENT has exceed
maximum delivery attempt
s and will be removed
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: