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

MQTT Paho Python reliable reconnect

I'm trying to get my MQTT Paho Python script to stay connected (and reconnect when it gets disconnected). Sadly, I'm not sure how to go about this. That said, the machine is connected through WiFi so in the case the signal falls out or the USB…
user5740843
  • 1,540
  • 5
  • 22
  • 42
17
votes
2 answers

Is video streaming over IoT protocols feasible?

Can Video streaming (low bitrates like 50 Kbps ) could be done over IoT protocols like CoAP/MQTT with much better performances compared to HTTP/RTP or TCP/UDP streaming? Or underlying video streaming architecture does not help the use case using…
Main
  • 1,804
  • 3
  • 20
  • 28
17
votes
1 answer

Horizontally scaling mosquitto broker

I am considering mosquitto for a MQTT broker. From what I've read, I realized that Mosquitto doesn't support Horizontal Scaling. So far all other criteria of my requirements can be met with Mosquitto. I'm not sure if the question is too generic or…
Dhanushka Dolapihilla
  • 1,115
  • 3
  • 17
  • 34
16
votes
7 answers

Get a list of connected client IDs from MQTT client

As a mqtt client connected to mosquitto is it possible to retrieve a list of client IDs who are also connected to the broker?
Andreas Linden
  • 12,489
  • 7
  • 51
  • 67
16
votes
2 answers

How to handle JWT revocation with MQTT

Following the instructions in this Auth0 article, I successfully authenticated MQTT clients using "JWT" as username and the JWT token as a password. In my use case, however, JWT tokens are short-lived. Clients must fetch a new token before the…
Arthur C
  • 1,274
  • 1
  • 14
  • 34
16
votes
2 answers

Synch and Asynchronous interface of MqttClient object are not working

I have created a client of type MqttClient and as shown below in the code, I create a client and se its Asynchronous callback. The problem is, 1-when I run the programm, the System.out.println("Client is Connected"); appears, but i receive no…
rmaik
  • 1,076
  • 3
  • 15
  • 48
15
votes
2 answers

Import Error: paho.mqtt.client not found

I am creating a docker containing python and php. I am writing a python script to connect to a MQTT broker residing in another docker. In my dockerfile I ensure that I install the paho client by using the following commands: RUN apt-get install -y…
Sid411
  • 703
  • 2
  • 9
  • 25
15
votes
2 answers

SparkStreaming, RabbitMQ and MQTT in python using pika

Just to make things tricky, I'd like to consume messages from the rabbitMQ queue. Now I know there is a plugin for MQTT on rabbit (https://www.rabbitmq.com/mqtt.html). However I cannot seem to make an example work where Spark consumes a message…
disruptive
  • 5,687
  • 15
  • 71
  • 135
15
votes
2 answers

AWS IoT MQTT over WebSocket Protocol

I've been following the AWS IoT docs trying to get started with the MQTT tutorial at http://docs.aws.amazon.com/iot/latest/developerguide/protocols.html#mqtt-ws to set up a WebSocket connection to AWS IoT in a web application. The first step is to…
Jack Carlisle
  • 1,085
  • 1
  • 9
  • 15
15
votes
3 answers

Java Eclipse Paho Implementation - Auto reconnect

I'm trying to implement eclipse.paho in my project to connect Mqtt Broker (Both subscribing and publishing purpose). The problem is, when I using the subscribing feature (Implementing MqttCallback interface), I couldn't figure our how can I…
Black Glix
  • 689
  • 2
  • 11
  • 26
15
votes
6 answers

address already in use error in mosquitto

I have installed mosquitto server and client packages in my ubuntu machine. When I run command "mosquitto" to run the mosquitto server I am getting an error "Error:address already in use". Why am I getting this error? How can I resolve this?
andro-girl
  • 7,989
  • 22
  • 71
  • 94
15
votes
7 answers

Cluster forming with Mosquitto broker

I am using Mosquitto broker to implement MQTT protocol. But I am unable to find how clustering can be done in case of mosquitto brokers. Also is there any limitation on number of clients those can be served with one broker.
Abhishek Maheshwari
  • 275
  • 1
  • 3
  • 12
14
votes
4 answers

Connection lost (32109) - java.io.EOFException

I used eclipse MQTT for connect to MQTT server. I can connect to server successfully but when i publish message , i got this error Connection lost msg : Connection lost loc : Connection lost cause : java.io.EOFException excep : Connection…
MrNadimi
  • 1,424
  • 4
  • 18
  • 33
14
votes
5 answers

Connecting nodejs and cloud mqtt

I am doing a project based on IOT. So I need to connect cloudmqtt and nodejs server. app.js // Create a MQTT Client var mqtt = require('mqtt'); // Create a client connection to CloudMQTT for live data var client = mqtt.connect('xxxxxxxxxxx', { …
Muhsin Keloth
  • 7,855
  • 7
  • 39
  • 59
14
votes
3 answers

OPC UA protocol vs MQTT protocol

I would like to compare OPC UA vs MQTT on basis of the general characteristics of both the protocols such as Overhead (Packets), Security, Information modeling and Reliability. Where can I find some sample data for Overhead, and other…
Azaksai
  • 377
  • 2
  • 6
  • 14