Paho is an Eclipse project has been created to provide scalable open-source implementations of open and standard messaging protocols like MQTT aimed at new, exisiting, and emerging applications for Machine-to-Machine (M2M) and Internet of Things (IoT).
Questions tagged [paho]
1173 questions
18
votes
2 answers
How to use paho mqtt client in django?
I am writing a django application which should act as MQTT publisher and as a subscriber.
Where should I start the paho client and run loop_forever() function.
Should it be in wsgi.py ?

Raja Sudhan
- 183
- 1
- 2
- 10
17
votes
10 answers
How to clear ALL retained mqtt messages from Mosquitto?
I've seen the mosquitto_pub -h [server] -r -n -t [XYZ] syntax for clearing out one off messages. My problem is the device developers have posted a lot of garbage messages.
I have a Java/Paho code base that I'd like to modify to do this…

JohnL
- 13,682
- 4
- 19
- 23
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
16
votes
2 answers
android - Paho MQTT service for publishing
I am new to Android and services. My aim is to be able to set-up subscriptions and do publications on topic strings. The topic strings and client ID are set-up after parsing input of text fields. I am using the Paho MQTT service (downloaded the…

cogitoergosum
- 2,309
- 4
- 38
- 62
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
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
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
13
votes
2 answers
Very slow network performance of Docker containers with host's network
I'm having a problem with sluggish network performance between Docker containers and host's network. I asked this question on the Docker's forum but have received no answers so far.
Problem
Set-up: two Macs on the same local network; the first runs…

Truong
- 569
- 2
- 4
- 13
13
votes
1 answer
Paho MQTT client connection reliability (reconnect on disconnection)
What is the most reliable way to use the Python Paho MQTT client? I want to be able to handle connection interruptions due to WiFi drops and keep trying to reconnect until it's successful.
What I have is the following, but are there any best…

Ellis Percival
- 4,632
- 2
- 24
- 34
12
votes
1 answer
golang mqtt publish and subscribe
Does anybody know where I can get some example MQTT client Go (golang) code that does both publish and subscribe in an infinite loop ?
I am messaging with a Mosquitto broker running on MacOs.
In more detail...
Get a message from the network (a…

Phillip Neal
- 445
- 1
- 3
- 10
12
votes
3 answers
How to Send data as JSON objects over to MQTT broker
I'm using eclipse paho client on ubuntu and trying to send latitude, longitude and timestamp information as JSON format to the MQTT broker. How do I do that?
I found this article, But its not complete.

user3690081
- 195
- 2
- 3
- 8
11
votes
3 answers
Paho MqttAndroidClient.connect always fails
I'd like to publish messages from an android service to a local server. Here is parts of my code in the simplest form based on snippets from here.
MemoryPersistence memPer;
MqttAndroidClient client;
@Override
public IBinder onBind(Intent intent) {
…

Farshid T
- 2,073
- 1
- 19
- 16
10
votes
2 answers
Fixing AMQJS0008I Socket closed error in PAHO JS + Activemq
Sometimes I am getting AMQJS0008I Socket closed error very frequently on onConnectionLost. I am using latest Activemq version.
Does it happens because of some wrong formatted message received because sometime it go all messages nicely and sometimes…

Manish Kumar
- 10,214
- 25
- 77
- 147
9
votes
2 answers
Mosquitto vs eclipse paho client library
I'm just looking into the details of Eclipse PAHO and Mosquitto client libraries (MQTT C++ libraries). It looks like the PAHO uses the mosquitto MQTT broker but provides its own MQTT client libraries.
Also the Mosquitto library provides a way to…

Panch
- 1,097
- 3
- 12
- 43
9
votes
1 answer
Python- Why is my Paho Mqtt Message Different Than When I Sent It?
I am working on a project using some C.H.I.P.s (Think Raspberry Pi) where I need to wirelessly send some information from a slave back to a master board. I am using Paho as my Mqtt client, and am using Mosquitto as my broker. My problem is when I…

Jake Vande Walle
- 145
- 1
- 2
- 9