activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Timothy Bish (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (AMQ-5042) Session.commit() hangs when amqp+nio is used
Date Tue, 11 Feb 2014 20:52:19 GMT

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

Timothy Bish updated AMQ-5042:
------------------------------

    Attachment: testSessionTransactedCommit-non-NIO.txt
                testSessionTransactedCommit-NIO.txt

Frame tracing for the testSessionTransactedCommit over TCP and NIO

> 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)

Mime
View raw message