Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [paho-dev] Can MQTT publsih file example pdf or txt instead ofmesssage

Hi Peiyuan,
 
Quoted from: http://www.hivemq.com/blog/mqtt-essentials-part-4-mqtt-publish-subscribe-unsubscribe
 
"MQTT is totally data-agnostic, it’s possible to send images, texts in any encoding, encrypted data and virtually every data in binary."
 
All you need to do is get a byte array of the data you want to send, publish it and then convert that byte array back into the correct format in your subscriber.
http://www.eclipse.org/paho/files/javadoc/index.html
 
Kind regards,
 
James Sutton
Software Engineer - IoT Foundation - MQTT Open Source Projects
Technical Trojan - Wimbledon Project

Phone: 01962 815438 | Extension: x372454
E-mail: 
Personal Website: www.jsutton.co.uk
Find me on:      
IBM

Hursley Park
HursleySO212JN
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: General Development Discussions for Paho Project <paho-dev@xxxxxxxxxxx>
Cc:
Subject: [paho-dev] Can MQTT publsih file example pdf or txt instead of messsage
Date: Wed, Oct 21, 2015 3:21 AM
 
hi sir/mdm
 
my name is peiyuan, currently i am interested in learning how to use mqtt. I am able to write publish and subscriber in java usinf org.eclipse.paho.client
My question is instead of pusblish String Message, can i publish image and pdf or txt file through mqtt? and is there any limited of which format to use when publish?
 
from 
peiyuan
 
 
_______________________________________________
paho-dev mailing list
paho-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/paho-dev
 


Back to the top