[
https://issues.apache.org/jira/browse/AMQ-6796?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Timothy Bish resolved AMQ-6796.
-------------------------------
Resolution: Fixed
Assignee: Timothy Bish
Fix Version/s: 5.16.0
5.15.1
> 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
> Assignee: Timothy Bish
> Fix For: 5.15.1, 5.16.0
>
>
> 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)