qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (QPID-5099) [JMS 0-8...0-9-1] Messages pre-aquired by the consumer are not released on MessageConsumer#close()
Date Mon, 22 Dec 2014 14:22:13 GMT

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

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

Commit 1647319 from [~k-wall] in branch 'qpid/trunk'
[ https://svn.apache.org/r1647319 ]

QPID-5099: Add system test to ensure that client does indeed release the messages on 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, 0.24, 0.26,
0.28, 0.30
>            Reporter: Alex Rudyy
>             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-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org


Mime
View raw message