Questions tagged [mqtt]

Message queuing telemetry transport, or MQTT, is a publish/subscribe messaging protocol designed to minimize network bandwidth usage and device resource requirements. Client and server implementations exist in a wide variety of languages.

MQTT is a small-footprint machine-to-machine (M2M) messaging protocol, useful for Internet of Things () applications and mobile or embedded environments where device resources and network bandwidth are minimal.

Client libraries and servers and are available in a wide variety of languages including C, Java, .NET, Python, and many more.

In October 2014, MQTT v3.1.1 was awarded OASIS Standard status. The new status provides a stable specification for implementors, improved interoperability, and assurance that the intellectual property will remain unencumbered and free for all to use.

In 2016 the standard was adopted by ISO in ISO/IEC 20922:2016.

Wikipedia reference

6207 questions
85
votes
4 answers

How do I subscribe to all topics of a MQTT broker

I want to connect a client which will monitor all the topics of the broker to respond to the events when I don't know what are names of topic.
Yugandhar Chaudhari
  • 3,831
  • 3
  • 24
  • 40
74
votes
6 answers

Direct MQTT vs MQTT over WebSocket

What are merits of MQTT over WebSocket compared to direct MQTT? I'm considering using MQTT in my project and so I want to know why some people choose MQTT over WebSocket instead of direct MQTT.
Takahiko Kawasaki
  • 18,118
  • 9
  • 62
  • 105
67
votes
6 answers

How to test the `Mosquitto` server?

I am new to Mosquitto and MQTT, I downloaded the Mosquitto server library but I do not know how to test it. Is there any way to test the Mosquitto server?
Amrmsmb
  • 1
  • 27
  • 104
  • 226
58
votes
2 answers

What is the difference between MQTT broker and Apache Kafka

I am developing a mobile messaging app. I was going through technology needed and found two MQTT & Apache Kafta. To me both seems doing the same thing in the same way (in terms of subscribing & publishing to a topic). I heard that MQTT is fit for…
Manish Kumar
  • 10,214
  • 25
  • 77
  • 147
45
votes
3 answers

MQTT vs. XMPP Which Should I Choose?

Overview I am sending messages back and forth between a client (Android phone) and a Server (Windows Server). Using a persistent connection over TCP, which protocol would be the best solution. I am looking at performance, scalability, size of…
Scott
  • 993
  • 3
  • 10
  • 28
43
votes
3 answers

Basic Steps for Using MQTT in android

I am new to Android and want to use MQTT as a push notifier for Android from Server. I have read about MQTT but I do not understand it very well. If anyone has used this library, please tell me what I have to do to start using it. I have a Java…
Johni Deep
  • 563
  • 1
  • 8
  • 10
42
votes
3 answers

When MQTT-SN should be used? How is it different from MQTT?

If MQTT is already a lightweight protocol and it uses small amount of power and bandwidth, then why do we have MQTT-SN? When is it appropriate to use MQTT and when MQTT-SN?
Sasikumar
  • 675
  • 2
  • 7
  • 17
41
votes
3 answers

MQTT what is the purpose or usage of Last Will Testament?

I'm surely missing something about how the whole MQTT protocol works, as I can't grasp the usage pattern of Last Will Testament messages: what's their purpose? One example I often see is about informing that a device has gone offline. It doesn't…
Alessandro Da Rugna
  • 4,571
  • 20
  • 40
  • 64
39
votes
8 answers

Can a web browser use MQTT?

We are looking at using MQTT as the messaging protocol on a new device we're building. We'd also like a web interface for the device. Does anyone know if you can implement a browser client app (without additional plugins) that talks MQTT?
fred basset
  • 9,774
  • 28
  • 88
  • 138
38
votes
2 answers

Is message order preserved in MQTT messages?

I wonder if the message sent order is preserved. That is, when a publisher sends a sequence of messages, is each subscriber guaranteed to receive the same sequence as the publisher had sent it? For both clean and persistent sessions?
Kar
  • 6,063
  • 7
  • 53
  • 82
34
votes
2 answers

What is the maximum message length for a MQTT broker?

I am using the node.js mosca MQTT broker for some internet of things (iot) application. https://github.com/mcollina/mosca What is the maximum message length that a topic can receive for the mosca broker? What are the factors that constrain the…
guagay_wk
  • 26,337
  • 54
  • 186
  • 295
33
votes
2 answers

Cloud connectivity for MQTT and AMQP?

What is the difference between MQTT and AMQP in terms of cloud connectivity? I need to compare these two protocols in terms of cloud connectivity/cooperation. I found some evidence that AMQP works better but I still need to find out the differences.
Ali Balador
  • 433
  • 1
  • 4
  • 4
31
votes
4 answers

MQTT Security - how to prevent abusers subscribing to topics?

I've got everything setup and working for MQTT now. I am using the IBM wmqtt.jar and the Mosquitto broker.. My Java Servlet creates an MQTTConnection to the broker and publishes under the topic "AndroidDeviceID/myAppName" .. The Android client…
Daniel Guillamot
  • 843
  • 2
  • 9
  • 18
29
votes
7 answers

How can I publish to a MQTT topic in a Amazon AWS Lambda function?

I would like to have an easy command like I use in the bash to publish something to a topic on MQTT inside a AWS Lambda function. Along the lines of: mosquitto_pub -h my.server.com -t "light/set" -m "on" Background: I would like to turn a lamp on…
matt_55_55
  • 291
  • 1
  • 3
  • 5
23
votes
3 answers

C# client library for subscribing/publishing MQTT (Really Small Message Broker)

I need to implement the push notification for Android but there will not be internet access and only intranet access is available. So I think I cannot use C2DM and third party API like UrbanAirship. So I am thinking of using MQTT RSMB(Really Small…
Riddle
  • 587
  • 1
  • 7
  • 21
1
2 3
99 100