You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Gary Tully (JIRA)" <ji...@apache.org> on 2009/02/24 18:18:59 UTC
[jira] Resolved: (AMQ-2128) close() from
MessageListener.onMessage() with AUTO or DUPS_OK ack mode should acknowedge
messages
[ https://issues.apache.org/activemq/browse/AMQ-2128?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Gary Tully resolved AMQ-2128.
-----------------------------
Resolution: Fixed
see svn commit comment
> 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.