activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary Tully (JIRA)" <j...@apache.org>
Subject [jira] Created: (AMQ-2128) close() from MessageListener.onMessage() with AUTO or DUPS_OK ack mode should acknowedge messages
Date Thu, 19 Feb 2009 12:53:59 GMT
close() from MessageListener.onMessage() with AUTO or DUPS_OK ack mode should acknowedge messages
-------------------------------------------------------------------------------------------------

                 Key: AMQ-2128
                 URL: https://issues.apache.org/activemq/browse/AMQ-2128
             Project: ActiveMQ
          Issue Type: Bug
          Components: Broker
    Affects Versions: 5.2.0
            Reporter: Gary Tully
            Assignee: Gary Tully
             Fix For: 5.3.0


With client ack mode, the message will remain unacked if it was not acked before the close.
With auto_ack or dups_ok mode, the close() will delivery an ack for all delivered messages,
including the message that caused the onMessage call.

code from acrivemq-core test org.apache.activemq.JMSConsumerTest:
{code}
       consumer.setMessageListener(new MessageListener() {
            public void onMessage(Message m) {
                try {
                    TextMessage tm = (TextMessage)m;
                    LOG.info("Got in first listener: " + tm.getText());
                    assertEquals("" + counter.get(), tm.getText());
                    counter.incrementAndGet();
                    if (counter.get() == 2) {
                        sendDone.await();
                        connection.close();
                        got2Done.countDown();
                    }
{code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message