[ 
https://issues.apache.org/jira/browse/ARTEMIS-1272?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16079579#comment-16079579
 ] 

ASF GitHub Bot commented on ARTEMIS-1272:
-----------------------------------------

Github user mtaylor commented on the issue:

    https://github.com/apache/activemq-artemis/pull/1389
  
    @clebertsuconic For QoS1 and QoS2 **every message** must be ack'd.  There 
is no optimisation like we have in CORE to do batching of acks.  This includes 
duplicate messages, note: It is possible for clients to have overlapping 
subscriptions and receive duplicates:
    
    > "When Clients make subscriptions with Topic Filters that include 
wildcards, it is possible for a Client’s subscriptions to overlap so that a 
published message might match multiple filters. In this case the Server MUST 
deliver the message to the Client respecting the maximum QoS of all the 
matching subscriptions [MQTT-3.3.5-1]. In addition, the Server MAY deliver 
further copies of the message, one for each additional matching subscription 
and respecting the subscription’s QoS in each case. "
    
    > 


> Artemis incorrectly handle MQTT acknowledgement
> -----------------------------------------------
>
>                 Key: ARTEMIS-1272
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-1272
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>          Components: MQTT
>    Affects Versions: 1.5.3, 2.1.0
>            Reporter: Odyldzhon Toshbekov
>
> When MQTT client send acknowledgement Artemis acknowledge previous sent 
> messages.
> Test case:
> 1. Connect to Broker (client 1)
> 2. Connect to Broker (client 2)
> 2. Send two messages with QOS = 1
> 3. Send acknowledgement for second message
> A.R. Artemis will remove from queue first and second message
> E.R. Artemis should remove only second message
> 4. Send acknowledgement for first message
> A.R. WARN message "attempted to Ack already Ack'd message"
> The cause of the problem located in the class MQTTPublisherManager methods 
> "handlePubRec", "handlePubComp", "handlePubAck" and "sendMessage"
> Fix: replace "session.getServerSession().acknowledge" to 
> session.getServerSession().individualAcknowledge 



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

Reply via email to