[
https://issues.apache.org/jira/browse/AMQ-6796?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16138567#comment-16138567
]
ASF subversion and git services commented on AMQ-6796:
------------------------------------------------------
Commit 4c986d102cd5c862d88fd84eec1889b9786e9970 in activemq's branch
refs/heads/master from [~tabish121]
[ https://git-wip-us.apache.org/repos/asf?p=activemq.git;h=4c986d1 ]
AMQ-6796 Avoid double Ack on commit in STOMP individual ack mode
During commit of transaction when subscription mode is individual ack
the messages can get double acked leading to an error about receipt of
an invalid ack.
> Acknowledging messages out of order in a STOMP 1.1 transaction raises
> exception
> -------------------------------------------------------------------------------
>
> Key: AMQ-6796
> URL: https://issues.apache.org/jira/browse/AMQ-6796
> Project: ActiveMQ
> Issue Type: Bug
> Components: stomp
> Affects Versions: 5.15.0
> Reporter: Markus Gerstel
>
> Reproducing the problem:
> * Receive two messages via STOMP on a subscription with ack:client-individual
> * Start a transaction
> * Acknowledge message #2
> * Acknowledge message #1
> * Commit the transaction
> Expected behaviour:
> * Both messages are acknowledged, life goes on
> Observed behaviour:
> * Exception is raised
> {{javax.jms.JMSException: Unmatched acknowledge: MessageAck {commandId = 0,
> responseRequired = false, ackType = 2, consumerId = ID:(...)-6:555:-1:1,
> firstMessageId = null, lastMessageId = ID:(...)-6:555:-1:1:1, destination =
> queue://(...), transactionId = null, messageCount = 2, poisonCause = null};
> Expected message count (2) differs from count in dispatched-list (1)
> at
> org.apache.activemq.broker.region.PrefetchSubscription.assertAckMatchesDispatched(PrefetchSubscription.java:519)
> at
> org.apache.activemq.broker.region.PrefetchSubscription.acknowledge(PrefetchSubscription.java:211)
> at
> org.apache.activemq.broker.region.AbstractRegion.acknowledge(AbstractRegion.java:528)
> at
> org.apache.activemq.broker.region.RegionBroker.acknowledge(RegionBroker.java:475)
> (..)}}
> I have prepared a [unit
> test|https://github.com/Anthchirp/activemq/commit/7df4f25975c6500e65b1688ca81e761c1825a32a]
> for this ([patch
> file|https://github.com/Anthchirp/activemq/commit/7df4f25975c6500e65b1688ca81e761c1825a32a.patch]).
> The exception is not raised if the messages are acknowledged outside of a
> transaction.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)