Questions tagged [mqtt]

For questions concerning the MQTT messaging protocol, a lightweight TCP/IP-based system for machine-to-machine communication.

Use this tag for questions that are about the MQTT messaging protocol and its uses in the Internet of Things.

Consider the question check list if your question fits the tag. You can also look at the example questions. If this tag doesn't fit your question have a look below at somehow related tags that might fit your question better.

Question checklist

  • Is your question related to the theory, design or implementation of MQTT in the context of the Internet of Things?
  • Is your question not asking for a comparison of various protocols? (this is usually too broad)

Example questions

Not what you are looking for?

  • Use the tag for the Mosquitto open source broker implementation.
  • Is your question primarily about implementing code to use MQTT? If so, ask at Stack Overflow.
  • Is your question about any publish/subscribe protocol? If so, use .
303 questions
48
votes
6 answers

When and why to use MQTT protocol?

I am developing a device which measures temperature, humidity and mass. Currently it uses HTTPS to upload data to a remote server. Now I know that there is a protocol called MQTT which is claimed to be the "protocol of Internet of Things". In what…
Bence Kaulics
  • 7,843
  • 8
  • 42
  • 90
26
votes
2 answers

What is the difference between MQTT and Web Sockets, and when should I use them?

What are the major differences between MQTT and Web Sockets? When using IoT for home automation - control and monitoring access over different devices, which one of them should be used when Rest API based and browser based accessibility is…
Shakti Phartiyal
  • 713
  • 1
  • 6
  • 15
24
votes
2 answers

Can Mosquitto support multiple brokers?

I've been considering Mosquitto for a MQTT message broker for a home IoT network, but I'm concerned that the broker could be a single point of failure which could bring down my whole network if it failed, since all messages have to go through the…
Aurora0001
  • 18,520
  • 13
  • 55
  • 169
21
votes
2 answers

Can an MQTT client subscribe to a topic created by itself?

In my understanding, in MQTT a topic is created once a client publishes something with the corresponding topic name. There is no need to configure a topic, publishing on it is enough. From here. It is possible for a client to subscribe to its own…
Bence Kaulics
  • 7,843
  • 8
  • 42
  • 90
21
votes
3 answers

Confusion about client-server connection establishment in MQTT

According to the specifications, it is always the client who should establish connection to a server. Client: A program or device that uses MQTT. A Client always establishes the Network Connection to the Server. It can Publish Application…
Bence Kaulics
  • 7,843
  • 8
  • 42
  • 90
18
votes
2 answers

Is MQTT protocol appropriate for transmitting sensor readings over BLE?

Assume that there are numerous weak sensors (e.g., Arduino level devices) which rely on BLE as means of communication and that these devices are connected to a more powerful gateway (e.g., Raspberry pi level of devices). I would like to know if MQTT…
dr.doom
  • 281
  • 1
  • 2
  • 4
17
votes
2 answers

How can I implement MQTT on an STM32F030K6T6?

The controller in question is an STM32F030K6T6, which has an ARM® 32-bit Cortex® -M0 low power core, 32 kB Flash memory and 4 kB SRAM. It interfaces an SIM808 for Internet connectivity. The resources are quite limited regarding the memory. Is it…
Bence Kaulics
  • 7,843
  • 8
  • 42
  • 90
17
votes
2 answers

What simple security tests can I perform on my MQTT network?

I am about to set up an MQTT network at home. I want to build up some knowledge by practical exercises. It would be a small network with the broker hosted on my laptop (Windows 7) and some Raspberry Pi powered client. Also I am thinking about making…
Bence Kaulics
  • 7,843
  • 8
  • 42
  • 90
17
votes
3 answers

Don’t subscribe to # - so how to dump all messages to database with Mosquitto?

HiveMQ's blog lists under "best practices" not to subscribe to the multi level wildcard when attempting to dump all messages to a database. They claim that the subscribing client may not be able to keep up with a high load of messages and propose to…
Ghanima
  • 2,539
  • 1
  • 19
  • 46
17
votes
1 answer

Are there any devices with open-source protocols over Wi-Fi?

I know how to program IoT using Arduino; but I want some ready made portable IoT devices that do not need any programming at device side. Just I want to buy and add these devices to the network (after some configuration) and (by using documentation…
Shahrzad
  • 319
  • 1
  • 6
16
votes
4 answers

How to enable detailed logging of Mosquitto broker on Windows 7?

I have a previous question and to get closer to a solution I want to enable Mosquitto broker logging on Windows 7. Originally I have started the broker manually as follows: mosquitto -p 1883 -v -v means verbose console logging. But this does not…
Bence Kaulics
  • 7,843
  • 8
  • 42
  • 90
15
votes
3 answers

Are there MQTT brokers that persist QoS 1/2 messages to disk?

As of now the EMQ (Erlang MQTT Broker) does not seem to persist QoS 1/2 messages to disk: How does EMQ persist QoS 1/2 messages? So in case of an unexpected server reboot, memory limits, or other event messages might be lost despite QoS 1/2 level…
Ghanima
  • 2,539
  • 1
  • 19
  • 46
15
votes
3 answers

Mosquitto on Raspberry Pi refuses connection after changing log settings

In my ongoing endeavors to get my Raspberry Pi to command my stuff I set up a Mosquitto MQTT broker. In the base settings everything went reasonably fine. I could post test messages with the publish command and receive them with the subscribe…
Helmar
  • 8,450
  • 6
  • 36
  • 84
15
votes
1 answer

What happens when there is not any subscriber to a topic in MQTT?

The situation is the following: There is a client, a publisher, it is not subscribed to any topic. This client has a single topic of its own, and publishes data reguraly to it. But there are not any other clients that are subscribed to this…
Bence Kaulics
  • 7,843
  • 8
  • 42
  • 90
14
votes
3 answers

Is there a standardized RPC mechanism for MQTT?

Over on Stack Overflow there is a question about implementing request/response interaction over MQTT. As one answer notes, you can do it by publishing the request on one topic and listening for the response on another token that was included in the…
Chris Steinbach
  • 734
  • 4
  • 13
1
2 3
20 21