[ https://issues.apache.org/jira/browse/QPID-5099?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Keith Wall reassigned QPID-5099: -------------------------------- Assignee: Keith Wall > [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.6, 0.8, 0.10, 0.12, 0.14, 0.16, 0.18, 0.20, 0.22, > 0.24, 0.26, 0.28, 0.30 > Reporter: Alex Rudyy > Assignee: Keith Wall > Fix For: 0.31 > > > 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 was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org For additional commands, e-mail: dev-h...@qpid.apache.org