# Cannot subscribe with MQTT QoS 1

**URL:** <https://forums.losant.com/t/cannot-subscribe-with-mqtt-qos-1/612>\
**Category:** Help\
**Created:** [September 3, 2017, 4:03am UTC](https://forums.losant.com/t/cannot-subscribe-with-mqtt-qos-1/612 "2017-09-03T04:03:39Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Denis\_French](https://avatars.discourse-cdn.com/v4/letter/d/7ea924/32.png) [@Denis\_French](https://forums.losant.com/u/Denis_French)\
**Post date:** [September 3, 2017, 4:03am UTC](https://forums.losant.com/t/cannot-subscribe-with-mqtt-qos-1/612/1 "2017-09-03T04:03:39Z")

</div>

Losant documentation ([https://docs.losant.com/mqtt/overview/#mqtt-version-and-limitations](https://docs.losant.com/mqtt/overview/#mqtt-version-and-limitations)) indicates that QoS 2 is not supported, implying that QoS 1 is.

When I subscribe to a topic using node-red with QoS set to 1 the received messages indicate that they are sent as QoS 0. This is replicated when troubleshooting using MQTT.fx .

Am I mistaken that subscribing with QoS 1 is supported, or is there something else that I am missing?

Any advise appreciated,  
Denis.

---

<div class="post-metadata">

**Author:** ![Brandon\_Cannaday](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/brandon_cannaday/32/14_2.png) [@Brandon\_Cannaday](https://forums.losant.com/u/Brandon_Cannaday)\
**Post date:** [September 3, 2017, 11:21am UTC](https://forums.losant.com/t/cannot-subscribe-with-mqtt-qos-1/612/2 "2017-09-03T11:21:30Z")

</div>

Apologies for the confusion. QoS 1 is only available for publishing. We’ll update the documentation to clarify that.

---

<div class="post-metadata">

**Author:** ![Denis\_French](https://avatars.discourse-cdn.com/v4/letter/d/7ea924/32.png) [@Denis\_French](https://forums.losant.com/u/Denis_French)\
**Post date:** [September 4, 2017, 10:43am UTC](https://forums.losant.com/t/cannot-subscribe-with-mqtt-qos-1/612/3 "2017-09-04T10:43:04Z")

</div>

Thanks for clarifying Brandon.

Is there any intent to implement QoS 1 for subscriptions? It seems quite central to ensuring reliable communication with a range of distributed devices with disparate connectivity.

The embedded MQTT service was one of the attractions of the Losant platform; it would be disappointing to have to integrate with an external MQTT server.

---

<div class="post-metadata">

**Author:** ![Brandon\_Cannaday](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/brandon_cannaday/32/14_2.png) [@Brandon\_Cannaday](https://forums.losant.com/u/Brandon_Cannaday)\
**Post date:** [September 12, 2017, 3:38pm UTC](https://forums.losant.com/t/cannot-subscribe-with-mqtt-qos-1/612/4 "2017-09-12T15:38:28Z")

</div>

I submitted a ticket to investigate supporting QoS 1 for client subscriptions. In the meantime, if you require the functionality, we do have an [MQTT integration](https://docs.losant.com/applications/integrations/#mqtt) that will allow you to use a third party MQTT broker while using Losant for additional functionality.

---

<div class="post-metadata">

**Author:** ![Denis\_French](https://avatars.discourse-cdn.com/v4/letter/d/7ea924/32.png) [@Denis\_French](https://forums.losant.com/u/Denis_French)\
**Post date:** [September 15, 2017, 7:00am UTC](https://forums.losant.com/t/cannot-subscribe-with-mqtt-qos-1/612/5 "2017-09-15T07:00:43Z")

</div>

Thanks Brandon; I look forward to hearing how it goes.

---

<div class="post-metadata">

**Author:** ![Jose\_Cruz](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/jose_cruz/32/1580_2.png) [@Jose\_Cruz](https://forums.losant.com/u/Jose_Cruz)\
**Post date:** [July 15, 2021, 1:03pm UTC](https://forums.losant.com/t/cannot-subscribe-with-mqtt-qos-1/612/6 "2021-07-15T13:03:27Z")

</div>

@Brandon_Cannaday : almost 4 years later, but we’re in the same boat as the post in here ► our MQTTS broker prefers/suggests SSL/Certificate (which we already implemented successfully) **and** _QoS 1_ - currently all messages in Losant are showing in the broker as _QoS 0_. I apologize if this has already been addressed elsewhere, if not, is _QoS 1_ still ‘on the works’ ? Thanks, 🔴

---

<div class="post-metadata">

**Author:** ![Brandon\_Cannaday](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/brandon_cannaday/32/14_2.png) [@Brandon\_Cannaday](https://forums.losant.com/u/Brandon_Cannaday)\
**Post date:** [July 15, 2021, 2:17pm UTC](https://forums.losant.com/t/cannot-subscribe-with-mqtt-qos-1/612/7 "2021-07-15T14:17:08Z")

</div>

Hey @Jose_Cruz,

QoS 1 is supported for publishing to Losant’s broker. This results in every message being PUBACK’d by the broker to verify delivery.

QoS 1 is technically allowed for subscriptions, but Losant’s broker does not support `cleansession=0`, which means unacknowledged publishes to client subscription will not be retried.

You can find a few more details and the reason these are not currently supported in the following thread:

> [@Workflow MQTT publish QoS?](https://forums.losant.com/t/workflow-mqtt-publish-qos/3835):
>
> Hi, The MQTT Message Node seems to only be able to publish with QoS=0. Is there any way I can use QoS=1 so that my device can then subscribe with QoS also 1, at any time and successfully get the message from the topic it’s subscribed to? From my understanding that is the only way to send a message (configuration command) to my device via Losant and MQTT. Any ideas? thanks

---

<div class="post-metadata">

**Author:** ![Jose\_Cruz](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/jose_cruz/32/1580_2.png) [@Jose\_Cruz](https://forums.losant.com/u/Jose_Cruz)\
**Post date:** [July 15, 2021, 2:40pm UTC](https://forums.losant.com/t/cannot-subscribe-with-mqtt-qos-1/612/8 "2021-07-15T14:40:07Z")

</div>

I am assuming by `cleansession=0` you mean the **[✓] Clean** option in the Losant Integration page to be ‘unchecked’, which is not. Please correct me if wrong. If that’s the case, is showing on the broker (I consider Losant to be the client) as _QoS=0_:

 ![image](https://us1.discourse-cdn.com/flex015/uploads/getstructure/original/2X/0/0772a5c5adf1592ff261daadfb9ee7e164bc2c67.png)  
Let me know if any of this makes sense, 🔴

---

<div class="post-metadata">

**Author:** ![Brandon\_Cannaday](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/brandon_cannaday/32/14_2.png) [@Brandon\_Cannaday](https://forums.losant.com/u/Brandon_Cannaday)\
**Post date:** [July 15, 2021, 2:48pm UTC](https://forums.losant.com/t/cannot-subscribe-with-mqtt-qos-1/612/9 "2021-07-15T14:48:41Z")

</div>

I see, you’re referring to Losant’s MQTT integration connecting to other brokers. This thread, and the other thread I linked are referring to clients connecting to Losant’s broker.

Supporting QoS 1 for integration subscriptions may be possible. I’ll create a ticket to investigate.

---

<div class="post-metadata">

**Author:** ![Jose\_Cruz](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/jose_cruz/32/1580_2.png) [@Jose\_Cruz](https://forums.losant.com/u/Jose_Cruz)\
**Post date:** [July 15, 2021, 3:08pm UTC](https://forums.losant.com/t/cannot-subscribe-with-mqtt-qos-1/612/10 "2021-07-15T15:08:28Z")

</div>

Ok, thanks. Now here’s the very dumb question: Losant has its own broker? Where is that configurable? 🔴

---

<div class="post-metadata">

**Author:** ![Brandon\_Cannaday](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/brandon_cannaday/32/14_2.png) [@Brandon\_Cannaday](https://forums.losant.com/u/Brandon_Cannaday)\
**Post date:** [July 15, 2021, 3:21pm UTC](https://forums.losant.com/t/cannot-subscribe-with-mqtt-qos-1/612/11 "2021-07-15T15:21:16Z")

</div>

Yep, Losant provides an MQTT broker. It’s one of the most common ways for devices to send telemetry data to the platform. All the details can be found here:

> **[MQTT Protocol](https://docs.losant.com/mqtt/overview/)**
>
> Learn how to leverage the Losant IoT Platform through MQTT.

---

<div class="post-metadata">

**Author:** ![Jose\_Cruz](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/jose_cruz/32/1580_2.png) [@Jose\_Cruz](https://forums.losant.com/u/Jose_Cruz)\
**Post date:** [July 15, 2021, 3:22pm UTC](https://forums.losant.com/t/cannot-subscribe-with-mqtt-qos-1/612/12 "2021-07-15T15:22:18Z")

</div>

Oh, yes, I remember now - Losant broker can’t change the topic and has to be fixed (no wildcards). Nevermind. I remember now why it didn’t work for us and we had to go to an independent broker. Yes, if you can find about QoS1 that’d be great! 🔴

---

<div class="post-metadata">

**Author:** ![Brandon\_Cannaday](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/brandon_cannaday/32/14_2.png) [@Brandon\_Cannaday](https://forums.losant.com/u/Brandon_Cannaday)\
**Post date:** [July 15, 2021, 3:24pm UTC](https://forums.losant.com/t/cannot-subscribe-with-mqtt-qos-1/612/13 "2021-07-15T15:24:06Z")

</div>

You can use any arbitrary topics with Losant’s broker and wildcards are supported in most places. Can you describe the limitation you experienced in more details?

---

<div class="post-metadata">

**Author:** ![Jose\_Cruz](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/jose_cruz/32/1580_2.png) [@Jose\_Cruz](https://forums.losant.com/u/Jose_Cruz)\
**Post date:** [July 15, 2021, 3:26pm UTC](https://forums.losant.com/t/cannot-subscribe-with-mqtt-qos-1/612/14 "2021-07-15T15:26:43Z")

</div>

> [@MQTT publishing](https://forums.losant.com/t/mqtt-publishing/3026/21):
>
> I’ve seen a couple of threads of this issue, I’ve read them extensively but I’m still having some questions. In my case, the MQTT client and Losant MQTT broker work as long as: MQTT Broker URL is correct (which it is) MQTT path matches (whether device or non-device, depending on access key; which it does) Access Key and Secret are correct (which they are) ClientID matches device clientID (which it does but for just that one device): [image] #4 is my predicament (and what I’m getting at in t…

---

<div class="post-metadata">

**Author:** ![Brandon\_Cannaday](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/brandon_cannaday/32/14_2.png) [@Brandon\_Cannaday](https://forums.losant.com/u/Brandon_Cannaday)\
**Post date:** [July 15, 2021, 3:30pm UTC](https://forums.losant.com/t/cannot-subscribe-with-mqtt-qos-1/612/15 "2021-07-15T15:30:23Z")

</div>

That makes sense. Connections to the broker require a device to authenticate, which makes it hard to use for system-to-system or “application level” access. We’ve been exploring ways to authenticate against the broker at an application level, specifically to help enable system-to-system integrations.

---

<div class="post-metadata">

**Author:** ![Jose\_Cruz](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/jose_cruz/32/1580_2.png) [@Jose\_Cruz](https://forums.losant.com/u/Jose_Cruz)\
**Post date:** [July 15, 2021, 3:34pm UTC](https://forums.losant.com/t/cannot-subscribe-with-mqtt-qos-1/612/16 "2021-07-15T15:34:16Z")

</div>

Ok, so it does **not** accept ‘_arbitrary topics_\*’ and/or '_wildcards’_. Because of this we’ve been at it for 2 years and are {now} comfortable with independent brokers. Our current MQTTS connection is SSL and Certified (thanks for that solution!). We just need the QoS1 clarification and we’ll be 🏇! 🔴

---

<div class="post-metadata">

**Author:** ![Brandon\_Cannaday](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/brandon_cannaday/32/14_2.png) [@Brandon\_Cannaday](https://forums.losant.com/u/Brandon_Cannaday)\
**Post date:** [July 15, 2021, 3:43pm UTC](https://forums.losant.com/t/cannot-subscribe-with-mqtt-qos-1/612/17 "2021-07-15T15:43:17Z")

</div>

It **does** accept arbitrary topics and wildcards. Your issue is more of an authentication problem, where a connection requires a device ID. It’s not uncommon for customers to use a “dummy” device as a way to get a client ID that can connect to the broker. The device isn’t used for any other purpose.

For example, you could have all of your devices publish data to `my/custom/topic/<device-id>` and then other devices (or the dummy device) can subscribe to the wildcard `my/custom/topic/#` and receive data for every topic under that wildcard. You can also use the MQTT Trigger to fire a workflow on that same wildcard topic.

As a note, additional topics are restricted by default. You’ll have to grant your access key access to the `my/custom/topic/#` wildcard topic. Details here:

> **[Access Keys](https://docs.losant.com/applications/access-keys/#additional-mqtt-topics-access)**
>
> Learn about creating and managing device access keys in the Losant platform.

---

<div class="post-metadata">

**Author:** ![Jose\_Cruz](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/jose_cruz/32/1580_2.png) [@Jose\_Cruz](https://forums.losant.com/u/Jose_Cruz)\
**Post date:** [July 15, 2021, 4:06pm UTC](https://forums.losant.com/t/cannot-subscribe-with-mqtt-qos-1/612/18 "2021-07-15T16:06:45Z")

</div>

Ok, this is definitely something in need of exploring further from our side. Wish it would’ve been a bit ‘simpler’ and ‘clearer’ and not such the confusion since 2 years ago. We will explore these newer suggested options along with our current external efforts and evaluate/decide on what works best for us, 🔴

---

<div class="post-metadata">

**Author:** ![Jose\_Cruz](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/jose_cruz/32/1580_2.png) [@Jose\_Cruz](https://forums.losant.com/u/Jose_Cruz)\
**Post date:** [August 10, 2021, 8:00pm UTC](https://forums.losant.com/t/cannot-subscribe-with-mqtt-qos-1/612/19 "2021-08-10T20:00:58Z")

</div>

@Brandon_Cannaday , we’re looking at this a bit further… when you say “_other devices (or the dummy device) can subscribe to the wildcard_”, can you explain a bit further so I can understand it? How will the devices subscribe to it, via the integration? Thanks, 🔴

---

<div class="post-metadata">

**Author:** ![Brandon\_Cannaday](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/brandon_cannaday/32/14_2.png) [@Brandon\_Cannaday](https://forums.losant.com/u/Brandon_Cannaday)\
**Post date:** [August 10, 2021, 10:25pm UTC](https://forums.losant.com/t/cannot-subscribe-with-mqtt-qos-1/612/20 "2021-08-10T22:25:51Z")

</div>

The MQTT Integration is not used in this scenario. The Integration allows Losant to subscribe to third-party MQTT brokers.

In this scenario, devices are connecting, publishing, and subscribing directly to Losant’s MQTT broker.

```nohighlight
mqtts://broker.losant.com

```

The device’s [access key/secret](https://docs.losant.com/applications/access-keys/), which is used as the username and password in the MQTT connection, controls which topics a device is allowed to publish and subscribe to.

By default, an access key only allows a device to publish and subscribe to the special device-specific topics (e.g. `state` and `command`). However, you can grant access to any arbitrary topics you choose, including wildcard topics.

In your case, I would expect something like the following:

Devices publishing data would be restricted to a topic containing their ID - e.g. `myCustomTopic/{deviceId}`.

For wildcard access, you’d create an access key that was granted access to the wildcard version of that topic - e.g. `myCustomTopic/#`. This access key would allow a device to subscribe to that wildcard topic and will receive data for all matching devices.

One caveat to keep in mind is that the MQTT rate limit (2/sec/topic) sill applies. So if that wildcard topic is receiving data for tons of devices, you could quickly exceed that limit.

[Next page](https://forums.losant.com/t/cannot-subscribe-with-mqtt-qos-1/612.md?page=2)
