Hi, I have some questions about MQTT

100 views
Skip to first unread message

송낙규

unread,
Oct 19, 2015, 4:16:22 AM10/19/15
to MQTT
Hi, I'm mqtt newer.

My project is notification in android from server.

I have some questions about MQTT.(I searched in google but I can't find result stisfied...)

1)  MQTT is using 'polling'?
    I know, client(android) sending packet (PINGREQ) to server for check alive.
    When it is occured, client and server is connected consistently? or when sending packet, connect for a moment?
    After first connect from client to server, never disconnected unless client sending DISCONENCT packet?

2) I can't see the subscribed Topis in Server?
    I can't found where is Topis saved.
    I think, it managed in file, but I can't found that.
    How can I see Topis?

3) Client(android) can use WebSocket?
    I'll using the server made by Java in Windows (I found the moquette) and Server will use WebSocket.
    And my client(android) will using WebSocket, too. (But, not using webapp. No Javascript. In android background used Java)
    But, I can't find the android example source used WebSocket. (In google, almost is webapp...)
    Android is can not use mqtt with WebSocket? Anyone know that where is example source~?

Thanks for your concern.

Simon Platten

unread,
Oct 19, 2015, 4:42:33 AM10/19/15
to mq...@googlegroups.com
Hi,

MQTT doesn't use Polling, it is a subscription system, where the client subscribes to a topic and item, when new data is posted to the "Broker" this is forwarded onto the clients that are subscribing to the topics/items.

If you are using a broker and have the source to it then you could get access to the subscription information, but there isn't a message system to deliver the subscription status.

Depending on the client and broker you are using sockets may well be used.  I have used MQTT with C, Java and NodeJS all work.

Android should be quite straight forward as it is coded in Java and the Java support for MQTT is very good.



--
To learn more about MQTT please visit http://mqtt.org
---
You received this message because you are subscribed to the Google Groups "MQTT" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mqtt+uns...@googlegroups.com.
To post to this group, send email to mq...@googlegroups.com.
Visit this group at http://groups.google.com/group/mqtt.
For more options, visit https://groups.google.com/d/optout.



--

송낙규

unread,
Oct 21, 2015, 9:56:25 PM10/21/15
to MQTT
Thanks for your reply!

MQTT doesn't use Polling, that means client and server are never disconnected while client do disconnect or occurred on server?

So then, MQTT default connection is same with websocket connection?

I know that websocket is connect consistently with client and server, but it is same connection status~?

Thanks!

2015년 10월 19일 월요일 오후 5시 42분 33초 UTC+9, Sy 님의 말:

Sumeet Puri

unread,
Oct 22, 2015, 9:57:12 AM10/22/15
to mq...@googlegroups.com
Hi, 

To add to Simon’s points, whether you can see the Topics, and how you can see them is actually dependent on the broker that you are using. 

There are many brokers which are mqtt complaint, but each adds it own administrative capability, in terms of statistics, reporting, how you can see topics, whether you can see topics under a particular client etc. It really depends on your use case and your choice of broker. 

Whether they are managed in a file or another data store, or even in memory again depends on the broker. E.g. hardware brokers would not even have a file system underneath but manage subscriptions in underlying circuitry. 

HTH, 
Sumeet.

송낙규

unread,
Oct 22, 2015, 8:26:14 PM10/22/15
to MQTT
Thanks Sumeet Puri!

I considering that on my project.

Thank you for good information

2015년 10월 22일 목요일 오후 10시 57분 12초 UTC+9, Sumeet Puri 님의 말:
Reply all
Reply to author
Forward
0 new messages