From fbc99d64211f79377d9b5a4665c12e90810d7ae8 Mon Sep 17 00:00:00 2001 From: Markus Bukowski Date: Wed, 27 Jan 2016 12:08:50 +0100 Subject: [PATCH 1/5] Replaced broken link to Java example with working one. --- site/confirms.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site/confirms.xml b/site/confirms.xml index 0d7e05e471..25abfc4d0b 100644 --- a/site/confirms.xml +++ b/site/confirms.xml @@ -60,7 +60,7 @@ limitations under the License. An example in Java that publishes a large number of messages to a channel in confirm mode and waits for the acknowledgements can be found here. + href="https://raw.githubusercontent.com/rabbitmq/rabbitmq-java-client/master/src/test/java/com/rabbitmq/examples/ConfirmDontLoseMessages.java">here.

Negative Acknowledgment

From 5d28ccd6e77fd1c9088d2401a755ec1497727f54 Mon Sep 17 00:00:00 2001 From: Daniil Fedotov Date: Wed, 27 Jan 2016 14:04:13 +0000 Subject: [PATCH 2/5] Docs for downgrading QoS2 to QoS1 --- site/mqtt.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/site/mqtt.md b/site/mqtt.md index 0c110fd1e2..6a7434d764 100644 --- a/site/mqtt.md +++ b/site/mqtt.md @@ -22,6 +22,7 @@ RabbitMQ supports MQTT as of 3.0 (currently targeting version 3.1.1 of the spec) ## Supported MQTT 3.1.1 features * QoS0 and QoS1 publish & consume +* QoS2 publish (downgraded to QoS1) * Last Will and Testament (LWT) * TLS/SSL * Session stickiness @@ -57,10 +58,11 @@ to inspect queue sizes, message rates, and so on. ### Subscription Durability -MQTT 3.1 assumes two primary usage scenarios: +MQTT 3.1 assumes three primary usage scenarios: * Transient clients that use transient (non-persistent) messages * Stateful clients that use durable subscriptions (non-clean sessions, QoS1) + * Stateful clients with durable subscriptions and two-step acknowledgement (exactly-once delivery, QoS2) This section briefly covers how these scenarios map to RabbitMQ queue durability and persistence features. @@ -76,6 +78,12 @@ For transient (QoS0) publishes, the plugin will publish messages as transient (non-persistent). Naturally, for durable (QoS1) publishes, persistent messages will be used internally. +**RabbitMQ doesn't support two-step acknowledgements, and so there is no support for QoS2 subscriptions.** +However, MQTT 3.1 supports QoS downgrade and RabbitMQ automatically downgrades +QoS2 publishes and subscribes to QoS1. All messages published as QoS2 will be +sent to subscribers as QoS1. All subscriptions with QoS2 will be downgraded to QoS1 +during SUBSCRIBE request (SUBACK responses will contain downgraded QoS). + Queues created for MQTT subscribers will have names starting with `mqtt-subscription-`, one per subscription QoS level. The queues will have [queue TTL](/ttl.html) depending on MQTT plugin configuration, 24 hours by default. From 481b8f712a24f2b2d53d83231bbacc6063480f46 Mon Sep 17 00:00:00 2001 From: Michael Klishin Date: Wed, 27 Jan 2016 17:22:19 +0300 Subject: [PATCH 3/5] Do not promise exactly-once delivery It is not something that can realistically implemented without using a "full blown" consensus protocol and sacrificing throughput. --- site/mqtt.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/site/mqtt.md b/site/mqtt.md index 6a7434d764..82494a1ff5 100644 --- a/site/mqtt.md +++ b/site/mqtt.md @@ -61,8 +61,7 @@ to inspect queue sizes, message rates, and so on. MQTT 3.1 assumes three primary usage scenarios: * Transient clients that use transient (non-persistent) messages - * Stateful clients that use durable subscriptions (non-clean sessions, QoS1) - * Stateful clients with durable subscriptions and two-step acknowledgement (exactly-once delivery, QoS2) + * Stateful clients that use durable subscriptions (non-clean sessions, QoS1 or QoS2) This section briefly covers how these scenarios map to RabbitMQ queue durability and persistence features. From 593c1cb70b0b1e2546c8d9db344aaa7b416f2b44 Mon Sep 17 00:00:00 2001 From: Michael Klishin Date: Wed, 27 Jan 2016 17:25:14 +0300 Subject: [PATCH 4/5] Edits --- site/mqtt.md | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/site/mqtt.md b/site/mqtt.md index 82494a1ff5..3bc00e58fb 100644 --- a/site/mqtt.md +++ b/site/mqtt.md @@ -61,7 +61,7 @@ to inspect queue sizes, message rates, and so on. MQTT 3.1 assumes three primary usage scenarios: * Transient clients that use transient (non-persistent) messages - * Stateful clients that use durable subscriptions (non-clean sessions, QoS1 or QoS2) + * Stateful clients that use durable subscriptions (non-clean sessions, QoS1) This section briefly covers how these scenarios map to RabbitMQ queue durability and persistence features. @@ -77,16 +77,17 @@ For transient (QoS0) publishes, the plugin will publish messages as transient (non-persistent). Naturally, for durable (QoS1) publishes, persistent messages will be used internally. -**RabbitMQ doesn't support two-step acknowledgements, and so there is no support for QoS2 subscriptions.** -However, MQTT 3.1 supports QoS downgrade and RabbitMQ automatically downgrades -QoS2 publishes and subscribes to QoS1. All messages published as QoS2 will be -sent to subscribers as QoS1. All subscriptions with QoS2 will be downgraded to QoS1 -during SUBSCRIBE request (SUBACK responses will contain downgraded QoS). - Queues created for MQTT subscribers will have names starting with `mqtt-subscription-`, one per subscription QoS level. The queues will have [queue TTL](/ttl.html) depending on MQTT plugin configuration, 24 hours by default. +**RabbitMQ does not support QoS2 subscriptions**. RabbitMQ +automatically downgrades QoS 2 publishes and subscribes to QoS +1. Messages published as QoS 2 will be sent to subscribers as QoS 1. +Subscriptions with QoS 2 will be downgraded to QoS1 during SUBSCRIBE +request (SUBACK responses will contain the actually provided QoS +level). + ## Plugin Configuration From a44817da536668fc0275d17de79d0e89d4edc173 Mon Sep 17 00:00:00 2001 From: Michael Klishin Date: Wed, 27 Jan 2016 17:25:20 +0300 Subject: [PATCH 5/5] Trailing ws --- site/mqtt.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/site/mqtt.md b/site/mqtt.md index 3bc00e58fb..f7cf0bdf13 100644 --- a/site/mqtt.md +++ b/site/mqtt.md @@ -2,8 +2,8 @@ Copyright (c) 2007-2016 Pivotal Software, Inc. All rights reserved. This program and the accompanying materials -are made available under the terms of the under the Apache License, -Version 2.0 (the "License”); you may not use this file except in compliance +are made available under the terms of the under the Apache License, +Version 2.0 (the "License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0