<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>nRF Cloud delivery guarantees with QoS &amp;gt; 0</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/127514/nrf-cloud-delivery-guarantees-with-qos-0</link><description>Hi! 
 
 I use nRF Cloud Lib of NCS v3.1.1. I couldn&amp;#39;t find detailed info on how nrf_cloud_send() works with QoS &amp;gt; 0. 
 If I set QoS &amp;gt; 0 and get a 0 error code returned from nrf_cloud_send(), does that mean the data was successfully delivered to the cloud</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 20 Mar 2026 13:37:57 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/127514/nrf-cloud-delivery-guarantees-with-qos-0" /><item><title>RE: nRF Cloud delivery guarantees with QoS &gt; 0</title><link>https://devzone.nordicsemi.com/thread/563773?ContentTypeID=1</link><pubDate>Fri, 20 Mar 2026 13:37:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1337b57b-a6dd-4c96-9e86-bae3f2cea720</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;Hello, from&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-nrf/blob/v3.1.1/include/net/nrf_cloud.h#L855C1-L869C1"&gt;nrf_cloud.h&lt;/a&gt;&amp;nbsp;we can see nrf_cloud_send() is defined:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;/**
 * @brief Send data to nRF Cloud.
 *
 * This API is used for sending data to nRF Cloud.
 *
 * @param[in] msg Pointer to a structure containing data and topic
 *                information.
 *
 * @retval 0       If successful.
 * @retval -EACCES Cloud connection is not established; wait for @ref NRF_CLOUD_EVT_READY.
 * @retval -EIO Error; failed to encode data.
 * @return A negative value indicates an error.
 */
int nrf_cloud_send(const struct nrf_cloud_tx_data *msg);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Where return value = 0 means successful.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;And here we also see that it uses the following structure to send data were mqtt_qos uses the same as Zephyr MQTT (zephyr/include/zephyr/net/mqtt.h)&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;/** @brief Structure used to send data to nRF Cloud. */
struct nrf_cloud_tx_data {
	/** Object containing data to be published */
	struct nrf_cloud_obj *obj;
	/** Pre-encoded data that is to be published if an object is not provided */
	struct nrf_cloud_data data;

	/** Endpoint topic type published to. */
	enum nrf_cloud_topic_type topic_type;
	/** Quality of Service of the message. */
	enum mqtt_qos qos;
	/** Message ID */
	uint32_t id;
};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Have a look at the sample&amp;nbsp;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-3.2.4/page/nrf/samples/cellular/nrf_cloud_mqtt_device_message/README.html"&gt;Cellular: nRF Cloud MQTT device message&lt;/a&gt;&amp;nbsp;(tag 3.2.4) on how they handle this.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;Kind regards,&lt;br /&gt;Øyvind&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>