You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Kevin Earls (JIRA)" <ji...@apache.org> on 2014/02/18 11:11:19 UTC

[jira] [Resolved] (AMQ-5042) Session.commit() hangs when amqp+nio is used

     [ https://issues.apache.org/jira/browse/AMQ-5042?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kevin Earls resolved AMQ-5042.
------------------------------

    Resolution: Fixed

> Session.commit() hangs when amqp+nio is used
> --------------------------------------------
>
>                 Key: AMQ-5042
>                 URL: https://issues.apache.org/jira/browse/AMQ-5042
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: AMQP
>    Affects Versions: 5.9.0
>            Reporter: Timothy Bish
>            Assignee: Timothy Bish
>            Priority: Critical
>             Fix For: 5.10.0
>
>         Attachments: testRollbackRececeivedMessage-NIO.txt, testRollbackRececeivedMessage-non-NIO.txt, testSessionTransactedCommit-NIO.txt, testSessionTransactedCommit-non-NIO.txt
>
>
> The follow test will cause a hang when run against amqp+nio transport.
> {code}
>     @Test(timeout=30000)
>     public void testSessionTransactedCommit() throws JMSException, InterruptedException {
>         ActiveMQAdmin.enableJMSFrameTracing();
>         Connection connection = createConnection();
>         Session session = connection.createSession(true, Session.AUTO_ACKNOWLEDGE);
>         Queue queue = session.createQueue(name.toString());
>         connection.start();
>         // transacted producer
>         MessageProducer pr = session.createProducer(queue);
>         for (int i = 0; i < 10; i++) {
>             Message m = session.createTextMessage("TestMessage" + i);
>             pr.send(m);
>         }
>         // No commit in place, so no message should be dispatched.
>         MessageConsumer consumer = session.createConsumer(queue);
>         TextMessage m = (TextMessage) consumer.receive(5000);
>         assertNull(m);
>         session.commit();
>         // Messages should be available now.
>         for (int i = 0; i < 10; i++) {
>             Message msg = consumer.receive(5000);
>             assertNotNull(msg);
>         }
>         session.close();
>         connection.close();
>     }
> {code}



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)