activemq-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Markus Gerstel (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (AMQ-6796) Acknowledging messages out of order in a STOMP 1.1 transaction raises exception
Date Tue, 22 Aug 2017 08:16:01 GMT

     [ https://issues.apache.org/jira/browse/AMQ-6796?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Markus Gerstel updated AMQ-6796:
--------------------------------
    Description: 
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
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])

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)
  	at org.apache.activemq.broker.BrokerFilter.acknowledge(BrokerFilter.java:89)
  	at org.apache.activemq.broker.BrokerFilter.acknowledge(BrokerFilter.java:89)
  	at org.apache.activemq.broker.BrokerFilter.acknowledge(BrokerFilter.java:89)
  	at org.apache.activemq.broker.TransactionBroker.acknowledge(TransactionBroker.java:276)
  	at org.apache.activemq.broker.BrokerFilter.acknowledge(BrokerFilter.java:89)
  	at org.apache.activemq.broker.BrokerFilter.acknowledge(BrokerFilter.java:89)
  	at org.apache.activemq.broker.BrokerFilter.acknowledge(BrokerFilter.java:89)
  	at org.apache.activemq.broker.BrokerFilter.acknowledge(BrokerFilter.java:89)
  	at org.apache.activemq.broker.BrokerFilter.acknowledge(BrokerFilter.java:89)
  	at org.apache.activemq.broker.BrokerFilter.acknowledge(BrokerFilter.java:89)
  	at org.apache.activemq.broker.TransportConnection.processMessageAck(TransportConnection.java:581)
  	at org.apache.activemq.command.MessageAck.visit(MessageAck.java:245)
  	at org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:330)
  	at org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:194)
  	at org.apache.activemq.transport.MutexTransport.onCommand(MutexTransport.java:45)
  	at org.apache.activemq.transport.AbstractInactivityMonitor.onCommand(AbstractInactivityMonitor.java:301)
  	at org.apache.activemq.transport.stomp.StompTransportFilter.sendToActiveMQ(StompTransportFilter.java:97)
  	at org.apache.activemq.transport.stomp.StompSubscription.onStompCommit(StompSubscription.java:125)
  	at org.apache.activemq.transport.stomp.ProtocolConverter.onStompCommit(ProtocolConverter.java:521)
  	at org.apache.activemq.transport.stomp.ProtocolConverter.onStompCommand(ProtocolConverter.java:256)
  	at org.apache.activemq.transport.stomp.StompTransportFilter.onCommand(StompTransportFilter.java:85)
  	at org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:83)
  	at org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:233)
  	at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:215)
  	at java.lang.Thread.run(Thread.java:748)}}

  was:
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
I have prepared a [unit test|https://github.com/Anthchirp/activemq/commit/4d8394c621c1bc3785e552681e59e5d2f3525a89]
for this ([patch file|https://github.com/Anthchirp/activemq/commit/4d8394c621c1bc3785e552681e59e5d2f3525a89.patch])

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)
  	at org.apache.activemq.broker.BrokerFilter.acknowledge(BrokerFilter.java:89)
  	at org.apache.activemq.broker.BrokerFilter.acknowledge(BrokerFilter.java:89)
  	at org.apache.activemq.broker.BrokerFilter.acknowledge(BrokerFilter.java:89)
  	at org.apache.activemq.broker.TransactionBroker.acknowledge(TransactionBroker.java:276)
  	at org.apache.activemq.broker.BrokerFilter.acknowledge(BrokerFilter.java:89)
  	at org.apache.activemq.broker.BrokerFilter.acknowledge(BrokerFilter.java:89)
  	at org.apache.activemq.broker.BrokerFilter.acknowledge(BrokerFilter.java:89)
  	at org.apache.activemq.broker.BrokerFilter.acknowledge(BrokerFilter.java:89)
  	at org.apache.activemq.broker.BrokerFilter.acknowledge(BrokerFilter.java:89)
  	at org.apache.activemq.broker.BrokerFilter.acknowledge(BrokerFilter.java:89)
  	at org.apache.activemq.broker.TransportConnection.processMessageAck(TransportConnection.java:581)
  	at org.apache.activemq.command.MessageAck.visit(MessageAck.java:245)
  	at org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:330)
  	at org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:194)
  	at org.apache.activemq.transport.MutexTransport.onCommand(MutexTransport.java:45)
  	at org.apache.activemq.transport.AbstractInactivityMonitor.onCommand(AbstractInactivityMonitor.java:301)
  	at org.apache.activemq.transport.stomp.StompTransportFilter.sendToActiveMQ(StompTransportFilter.java:97)
  	at org.apache.activemq.transport.stomp.StompSubscription.onStompCommit(StompSubscription.java:125)
  	at org.apache.activemq.transport.stomp.ProtocolConverter.onStompCommit(ProtocolConverter.java:521)
  	at org.apache.activemq.transport.stomp.ProtocolConverter.onStompCommand(ProtocolConverter.java:256)
  	at org.apache.activemq.transport.stomp.StompTransportFilter.onCommand(StompTransportFilter.java:85)
  	at org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:83)
  	at org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:233)
  	at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:215)
  	at java.lang.Thread.run(Thread.java:748)}}


> 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
> 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])
> 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)
>   	at org.apache.activemq.broker.BrokerFilter.acknowledge(BrokerFilter.java:89)
>   	at org.apache.activemq.broker.BrokerFilter.acknowledge(BrokerFilter.java:89)
>   	at org.apache.activemq.broker.BrokerFilter.acknowledge(BrokerFilter.java:89)
>   	at org.apache.activemq.broker.TransactionBroker.acknowledge(TransactionBroker.java:276)
>   	at org.apache.activemq.broker.BrokerFilter.acknowledge(BrokerFilter.java:89)
>   	at org.apache.activemq.broker.BrokerFilter.acknowledge(BrokerFilter.java:89)
>   	at org.apache.activemq.broker.BrokerFilter.acknowledge(BrokerFilter.java:89)
>   	at org.apache.activemq.broker.BrokerFilter.acknowledge(BrokerFilter.java:89)
>   	at org.apache.activemq.broker.BrokerFilter.acknowledge(BrokerFilter.java:89)
>   	at org.apache.activemq.broker.BrokerFilter.acknowledge(BrokerFilter.java:89)
>   	at org.apache.activemq.broker.TransportConnection.processMessageAck(TransportConnection.java:581)
>   	at org.apache.activemq.command.MessageAck.visit(MessageAck.java:245)
>   	at org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:330)
>   	at org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:194)
>   	at org.apache.activemq.transport.MutexTransport.onCommand(MutexTransport.java:45)
>   	at org.apache.activemq.transport.AbstractInactivityMonitor.onCommand(AbstractInactivityMonitor.java:301)
>   	at org.apache.activemq.transport.stomp.StompTransportFilter.sendToActiveMQ(StompTransportFilter.java:97)
>   	at org.apache.activemq.transport.stomp.StompSubscription.onStompCommit(StompSubscription.java:125)
>   	at org.apache.activemq.transport.stomp.ProtocolConverter.onStompCommit(ProtocolConverter.java:521)
>   	at org.apache.activemq.transport.stomp.ProtocolConverter.onStompCommand(ProtocolConverter.java:256)
>   	at org.apache.activemq.transport.stomp.StompTransportFilter.onCommand(StompTransportFilter.java:85)
>   	at org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:83)
>   	at org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:233)
>   	at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:215)
>   	at java.lang.Thread.run(Thread.java:748)}}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message