activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dhiraj Bokde (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (AMQ-5092) MQTT uses duplicate packet IDs for PUBLISH messages
Date Tue, 11 Mar 2014 20:50:43 GMT

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

Dhiraj Bokde updated AMQ-5092:
------------------------------

    Attachment: AMQ-5092.patch2

I am attaching an updated patch with a fix in a unit test for another intermittent failure
when messages arrive slightly out of order for overlapping subscriptions. I have also refined
the tests to add a slight delay after removing and creating subscriptions in testResendMessageId(),
which seems to let the test pass now. 

Please test with the updated patch instead of the previous one. 

> MQTT uses duplicate packet IDs for PUBLISH messages
> ---------------------------------------------------
>
>                 Key: AMQ-5092
>                 URL: https://issues.apache.org/jira/browse/AMQ-5092
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: MQTT
>    Affects Versions: 5.9.0
>            Reporter: Dhiraj Bokde
>            Assignee: Hadrian Zbarcea
>             Fix For: 5.10.0
>
>         Attachments: AMQ-5092.patch, AMQ-5092.patch2
>
>
> MQTT protocol converters does not correctly generate unique packet ids for retained and
non-retained publish messages sent to clients. MQTT requires that all Publish messages with
QoS > 0 must have a unique packet id which can be used by clients to coordinate the PUBACK,
PUBREC, PUBREL and PUBCOMP messages depending upon the QoS flow. 
> Although retained messages published on creation of client subscriptions are copies of
retained messages, they must carry a unique packet id when dispatched to clients. ActiveMQ
re-uses the retained message's packet id, which makes it difficult to acknowledge these messages
when wildcard topics are used. 
> ActiveMQ also sends the same non-retained message multiple times for every matching subscription
for overlapping subscriptions. These messages also re-use the publisher's message id as the
packet id, which breaks client acknowledgment. 
> A patch is included, which fixes all the above scenarios. It generates a unique packet
id for every publish (retained and non-retained), and also ensures that redelivery on the
same connection will re-use message ids, with the dup flag set. The patch also maps JMS redelivery
status for a subscription to the MQTT Dup flag to indicate duplicate messages. Unit tests
are included to test correct packet id generation. 



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message