<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>MQTT on Nalar</title>
    <link>https://nalar.dev/tags/mqtt/</link>
    <description>Recent content in MQTT on Nalar</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <lastBuildDate>Sat, 19 Sep 2026 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://nalar.dev/tags/mqtt/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>ESP32 MQTT over TLS: Transport Encryption and Broker Authentication Are Separate</title>
      <link>https://nalar.dev/esp32-mqtt-tls-transport-encryption-broker-authentication/</link>
      <pubDate>Sat, 19 Sep 2026 00:00:00 +0000</pubDate>
      <guid>https://nalar.dev/esp32-mqtt-tls-transport-encryption-broker-authentication/</guid>
      <description>&lt;p&gt;An ESP32 that moves an MQTT connection from port 1883 to 8883 crosses more than a port boundary. The TCP stream is now expected to carry MQTT inside TLS. Data in transit is protected only when the TLS client also validates the broker certificate. MQTT username/password authentication is separate: credentials identify the client to the broker, while certificate validation identifies the broker to the ESP32.&lt;/p&gt;&#xA;&lt;p&gt;Calling this &amp;ldquo;MQTT with HTTPS&amp;rdquo; mixes two application protocols. MQTT does not become HTTP when TLS is added. MQTT can run over plain TCP or over a TLS-protected TCP connection.&lt;/p&gt;</description>
    </item>
    <item>
      <title>ESP32 MQTT Sensor State: Publishing DHT22 Temperature and Humidity as One JSON Message</title>
      <link>https://nalar.dev/esp32-mqtt-sensor-state-json-dht22/</link>
      <pubDate>Sat, 19 Sep 2026 00:00:00 +0000</pubDate>
      <guid>https://nalar.dev/esp32-mqtt-sensor-state-json-dht22/</guid>
      <description>&lt;p&gt;A DHT22 read produces temperature and relative humidity from the same sampling event. Publishing them on separate MQTT topics works, but it also creates two independent message boundaries. A subscriber can receive the new temperature before the matching humidity value arrives.&lt;/p&gt;&#xA;&lt;p&gt;Putting both measurements in one payload preserves the relationship explicitly:&lt;/p&gt;&#xA;&lt;div&#xA;  x-data=&#34;{ code: $el.querySelector(&#39;code&#39;).innerText, copied: false }&#34;&#xA;  class=&#34;code-block group relative my-6 overflow-hidden rounded-xl border border-line bg-surface-muted dark:border-night-line dark:bg-night-surface&#34;&gt;&#xA;  &lt;button&#xA;    type=&#34;button&#34;&#xA;    @click=&#34;navigator.clipboard.writeText(code); copied = true; setTimeout(() =&gt; copied = false, 1600)&#34;&#xA;    class=&#34;absolute right-3 top-3 z-10 rounded-lg border border-line-strong bg-surface px-2 py-1 font-mono text-[0.8rem] text-muted opacity-0 transition group-hover:opacity-100 hover:bg-ink hover:text-white dark:border-night-line dark:bg-night dark:text-night-muted dark:hover:bg-white dark:hover:text-ink&#34;&gt;&#xA;    &lt;span x-text=&#34;copied ? &#39;Copied&#39; : &#39;Copy&#39;&#34;&gt;&lt;/span&gt;&#xA;  &lt;/button&gt;&#xA;  &#xA;  &lt;div class=&#34;overflow-x-auto p-4 text-sm leading-6 [&amp;_pre]:!m-0 [&amp;_pre]:!bg-transparent [&amp;_pre]:!p-0 [&amp;_code]:font-mono&#34;&gt;&#xA;    &lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-json&#34; data-lang=&#34;json&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;{&lt;span style=&#34;font-weight:bold&#34;&gt;&amp;#34;temperature&amp;#34;&lt;/span&gt;:25.34,&lt;span style=&#34;font-weight:bold&#34;&gt;&amp;#34;humidity&amp;#34;&lt;/span&gt;:60.21}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#xA;  &lt;/div&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;MQTT does not require JSON. The useful property here is that both measurements travel in one publication and can be treated as one sensor-state snapshot.&lt;/p&gt;</description>
    </item>
    <item>
      <title>FCM Is a Wake-Up Path, Not a Real-Time Transport</title>
      <link>https://nalar.dev/fcm-is-a-wake-up-path-not-a-real-time-transport/</link>
      <pubDate>Sat, 19 Sep 2026 00:00:00 +0000</pubDate>
      <guid>https://nalar.dev/fcm-is-a-wake-up-path-not-a-real-time-transport/</guid>
      <description>&lt;h1 id=&#34;fcm-is-a-wake-up-path-not-a-real-time-transport&#34;&gt;FCM Is a Wake-Up Path, Not a Real-Time Transport&lt;/h1&gt;&#xA;&lt;p&gt;A mobile application can maintain a WebSocket while it is active and still need Firebase Cloud Messaging when the operating system suspends it. Those mechanisms solve different failure conditions.&lt;/p&gt;&#xA;&lt;p&gt;WebSocket, MQTT, and SignalR assume that a client can participate in a live communication session. FCM is useful precisely when that assumption no longer holds: the application may be backgrounded, its process may not be running, or its persistent connection may have disappeared.&lt;/p&gt;</description>
    </item>
    <item>
      <title>MQTT and QUIC Solve Different Parts of a Chat Transport</title>
      <link>https://nalar.dev/mqtt-and-quic-solve-different-parts-of-a-chat-transport/</link>
      <pubDate>Sat, 19 Sep 2026 00:00:00 +0000</pubDate>
      <guid>https://nalar.dev/mqtt-and-quic-solve-different-parts-of-a-chat-transport/</guid>
      <description>&lt;h1 id=&#34;mqtt-and-quic-solve-different-parts-of-a-chat-transport&#34;&gt;MQTT and QUIC Solve Different Parts of a Chat Transport&lt;/h1&gt;&#xA;&lt;p&gt;MQTT and QUIC are often placed in the same comparison table when discussing real-time chat. That comparison is convenient, but it collapses two different protocol layers into one choice.&lt;/p&gt;&#xA;&lt;p&gt;MQTT is an application-layer messaging protocol. It defines concepts such as clients, brokers, topics, subscriptions, retained messages, session state, and delivery quality of service. QUIC is a secure transport protocol over UDP. It provides connections, streams, flow control, loss recovery, encryption, and connection migration mechanisms.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
