Alex Rudyy created QPID-5099:
--------------------------------
Summary: [JMS 0-8...0-9-1] Messages pre-aquired by the consumer
are not released on MessageConsumer#close()
Key: QPID-5099
URL: https://issues.apache.org/jira/browse/QPID-5099
Project: Qpid
Issue Type: Bug
Components: Java Client
Affects Versions: 0.22, 0.20, 0.18, 0.16, 0.14, 0.12, 0.10, 0.8, 0.6
Reporter: Alex Rudyy
Messages pre-aquired by the consumer are not released on
MessageConsumer#close() and remain in Acquired state until session is closed.
The issue can be reproduce with the following system test
{code}
public void testConsumerCloseWhithMessagesOnQueue() throws Exception
{
// use default prefetch of 500 messages
Connection connection = getConnection();
Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
Destination destination = getTestQueue();
MessageConsumer consumer = session.createConsumer(destination);
int numberOfMessages = 100;
sendMessage(session, destination, numberOfMessages);
((AMQSession<?, ?>)session).sync();
connection.start();
for (int i = 0; i < numberOfMessages; i++)
{
Message m = consumer.receive(1000l);
assertNotNull("Message [" + i + "] is not received", m);
assertEquals("Unexpected index", i, m.getIntProperty(INDEX));
consumer.close();
consumer = session.createConsumer(destination);
}
Message m = consumer.receive(1000l);
assertNull("Unexpected message is received", m);
consumer.close();
}
{code}
AMQP 0.10 client is not affected by the issue
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]