[
Date Prev][
Date Next][
Thread Prev][Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [paho-dev] How to publish and Subscriber MQTT in Wide area network using mosquitto
|
Hi Peiyuan,
What programming language are you trying to use? I'll assume Java for now as I think your previous questions were about that.
I've attached a quick and dirty sample I just threw together showing how to subscribe to a topic and print incoming messages to the console which should help as well.
If you've got Mosquitto installed on your local machine, you can always use the mosquitto_sub command to test that the route to the broker is working (
http://mosquitto.org/man/mosquitto_sub-1.html) e.g. mosquitto_sub -h iot.eclipse.org -t /test
Hope that's of some help!
Kind regards,
James Sutton Software Engineer - IoT Foundation - MQTT Open Source Projects Technical Trojan - Wimbledon Project |
|
| Hursley Park Hursley, SO212JN United Kingdom |
IBM United Kingdom Limited Registered in England and Wales with number 741598 Registered office: PO Box 41, North Harbour, Portsmouth, Hants. PO6 3AU
----- Original message -----
From: fang peiyuan <fang_peiyuan@xxxxxxxxx>
Sent by: paho-dev-bounces@xxxxxxxxxxx
To: "paho-dev@xxxxxxxxxxx" <paho-dev@xxxxxxxxxxx>
Cc:
Subject: [paho-dev] How to publish and Subscriber MQTT in Wide area network using mosquitto
Date: Tue, Oct 13, 2015 6:19 AM
hi sir/ mdm
my name is peiyuan, currently i need to write a programming using MQTT to publish and subscriber to wide area network using mosquitto .
i am able to publish the data to the wide area network but i am unable to subscriber. using my wan addpress to reterieve my meesage through MQTT
is there any tutorial i can follow and learn from it? thank you
from
peiyuan
Attachment:
MqttSubscribeSample.java
Description: Binary data