Questions tagged [mosquitto]

For questions concerning Eclipse Mosquitto, an open source MQTT broker implementation, including setup questions, issues with running the broker, and questions about the behaviour of Mosquitto.

Use this tag for questions that are about Eclipse's Mosquitto broker for MQTT.

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 about something that is specific to Mosquitto?
  • Would using alone not be sufficiently clear about your question's constraints?

Example questions

Not what you are looking for?

  • Use when your question is about the MQTT protocol, and your specific choice of broker is not important.

Also, consider reading the tag wiki and using this tag as well as in the majority of cases.

75 questions
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
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
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

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
13
votes
1 answer

mosquitto_sub "connection refused" on Arch Linux

So I installed mosquitto and mosquitto-client on a Raspberry Pi running Raspbian Jessie through apt-get as well as mosquitto on another Pi running Arch Linux through pacman. On Arch the client utils do not need to be installed separately. Testing…
Ghanima
  • 2,539
  • 1
  • 19
  • 46
12
votes
3 answers

Should I use Mosquitto's web sockets or connect clients directly?

According to this blog, Mosquitto (the MQTT broker) now supports connecting to clients over web sockets. The blog article seems to hint that web sockets are more useful for browser applications, since web browsers don't support proper TCP sockets…
Aurora0001
  • 18,520
  • 13
  • 55
  • 169
10
votes
1 answer

Can a Mosquitto MQTT client forcibly disconnect another?

I've been wondering how an MQTT client could instruct the broker to disconnect a client by some means, in case I need to force-disconnect a client from my MQTT server (for example, if it's misbehaving somehow and not responding correctly). A…
Aurora0001
  • 18,520
  • 13
  • 55
  • 169
10
votes
1 answer

mosquitto_sub: command not found

I'm using a raspberry pi image that has the mosquitto broker installed. To troubleshoot, instruction was to run: pi@raspberrypi:/ $ mosquitto_sub -v -t "gateway/+/rx" However that resulted in: -bash: mosquitto_sub: command not found Even though…
Chris
  • 331
  • 1
  • 2
  • 7
10
votes
4 answers

How to enable WebSockets on Mosquitto running on Windows?

I have a Mosquitto broker up and running on my Windows machine. I don't remember if I installed it with Web Sockets support (Cause I didn't knew what that was, or if I needed it). But seeing now my requirement is to use JavaScript (Paho) to connect…
Salim Shamim
  • 753
  • 1
  • 5
  • 15
9
votes
1 answer

How to modify only the Client ID in an MQTT CONNECT message?

I am playing around with MQTT CONNECT messages. I have a simple C program which opens a TCP/IP socket towards an Mosquitto broker running on my laptop, sends an MQTT CONNECT message, (normally) receives the 4 byte long CONNACK reply then closes the…
Bence Kaulics
  • 7,843
  • 8
  • 42
  • 90
9
votes
1 answer

What happens if Mosquitto runs out of memory to store QoS 1/2 messages?

In MQTT, messages with QoS 1 or 2 must be delivered at least once (QoS 2 messages must be delivered exactly once). If the client is not connected, the broker must store the message until the client is ready to receive it. The HiveMQ blog has an…
Aurora0001
  • 18,520
  • 13
  • 55
  • 169
9
votes
1 answer

How to start Mosquitto broker service on Windows 7 from command prompt?

I have set up Mosquitto MQTT on my Windows 7 laptop. I have performed the installation process according to this step by step guide. Installation was alright and I could start the Mosquitto Broker's service by using…
Bence Kaulics
  • 7,843
  • 8
  • 42
  • 90
9
votes
1 answer

Are there standardized MQTT topics?

I am new to MQTT (and home automation in general, I am much more in the systems and dev side), flashed a WiFi switch (Sonoff Basic), connected it to an instance of Mosquitto and Home Assistant and so far everything works fine. When monitoring the…
WoJ
  • 865
  • 1
  • 6
  • 14
9
votes
2 answers

List clients subscribed to a certain topic in Mosquitto server

So that is the general question, but I'll provide the scenario here. I'm running Mosquitto server to provide mqtt comm between esp relay modules (Sonoff from Itead) and Home Assistant. Most of the time, it works just fine. Each module has its own…
Dario
  • 339
  • 1
  • 3
  • 6
1
2 3 4 5