You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2014/12/16 17:57:13 UTC

[jira] [Commented] (QPID-5099) [JMS 0-8...0-9-1] Messages pre-aquired by the consumer are not released on MessageConsumer#close()

    [ https://issues.apache.org/jira/browse/QPID-5099?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14248478#comment-14248478 ] 

ASF subversion and git services commented on QPID-5099:
-------------------------------------------------------

Commit 1646009 from [~godfrer] in branch 'qpid/trunk'
[ https://svn.apache.org/r1646009 ]

QPID-5099 : [Java Client] release pre-acquired messages after explicit consumer close

> [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
>            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 was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org