activemq-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <>
Subject [jira] [Commented] (AMQ-6697) Aborting a STOMP 1.1 transaction after ACK/NACK leads to invalid state
Date Fri, 02 Jun 2017 18:23:04 GMT


ASF subversion and git services commented on AMQ-6697:

Commit 1c141eae409f87f5a2d8ffe1a5d8821882a614a0 in activemq's branch refs/heads/activemq-5.14.x
from [~tabish121]
[;h=1c141ea ]

AMQ-6697 Adds a test to show that the described case works

Correctly ACK inside a TX and then Abort and then ACK again outside a TX
to show that the broker will then mark the message as consumed.
(cherry picked from commit bd8661796b190ef605458cdd7a0d90d9af4f51a0)

> Aborting a STOMP 1.1 transaction after ACK/NACK leads to invalid state
> ----------------------------------------------------------------------
>                 Key: AMQ-6697
>                 URL:
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: stomp
>    Affects Versions: 5.14.5
>            Reporter: Markus Gerstel
> Reproducing the problem:
> * Receive a message via STOMP (+EDIT: on a subscription with ack:client-individual+)
> * Start a transaction
> * ACK -(or NACK)- the message within the transaction
> * Abort the transaction
> * ACK (or NACK) the message
> Expected behaviour:
> * The message is according to step #5 either ACKed or NACKed.
> Observed behaviour:
> * The message is neither ACKed nor NACKed, but stays in unacknowledged state
> * An exception is raised:
>  org.apache.activemq.transport.stomp.ProtocolException: Unexpected ACK received for message-id
>         at org.apache.activemq.transport.stomp.ProtocolConverter.onStompAck(
>         at org.apache.activemq.transport.stomp.ProtocolConverter.onStompCommand(
>         at org.apache.activemq.transport.stomp.StompTransportFilter.onCommand(
>         at org.apache.activemq.transport.TransportSupport.doConsume(
>         at org.apache.activemq.transport.tcp.TcpTransport.doRun(
>         at
>         at
> * an ERROR message is sent to the client
> As far as I can tell this is caused by code in both onStompAck() and onStompNack():
> With a STOMP 1.1 ACK/NACK, ackId == null, so the message entry is taken out of this.pedingAcks
> When the transaction is aborted the message entry is then not put back into this.pedingAcks,
so any subsequent ACK/NACK will find pendingAck==null, therefore acked==false, raising an

This message was sent by Atlassian JIRA

View raw message