Hi all,
This is my very first library![Smile :) :)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
It implements MQTT standard V3.1.1
MQTT is a lightweight publish/subscribe messaging protocol.
for further information see http://mqtt.org/.
Publish/Subscribe
The MQTT protocol is based on the principle of publishing messages and subscribing to topics, or "pub/sub". Multiple clients connect to a broker and subscribe to topics that they are interested in. Clients also connect to the broker and publish messages to topics. Many clients may subscribe to the same topics and do with the information as they please. The broker and MQTT act as a simple, common interface for everything to connect to.
Quality of Service
MQTT defines three levels of Quality of Service (QoS). The QoS defines how hard the broker/client will try to ensure that a message is received.
Implemented levels are :
On connection, a client sets the "clean session" flag, which is sometimes also known as the "clean start" flag. If clean session is set to false, then the connection is treated as durable. This means that when the client disconnects, any subscriptions it has will remain and any subsequent QoS 1 or 2 messages will be stored until it connects again in the future. If clean session is true, then all subscriptions will be removed for the client when it disconnects.
Limitation : Persistency of sessions is not implemented yet on the client side (this library)
Retained Messages
All messages may be set to be retained. This means that the broker will keep the message even after sending it to all current subscribers.
Last Will Testament
When a client connects to a broker, it may inform the broker that it has a will. This is a message that it wishes the broker to send when the client disconnects unexpectedly.
Version 1.0
This is the first release. It is provided with a very basic sample test App.
The use is totally free, with no limitation.
Utilisation
Connect to a broker (here iot.eclipse.org)
Events :
Methods :
test App :
it is limited to :
Enjoy !
And give me your feedback
This is my very first library
It implements MQTT standard V3.1.1
MQTT is a lightweight publish/subscribe messaging protocol.
for further information see http://mqtt.org/.
Publish/Subscribe
The MQTT protocol is based on the principle of publishing messages and subscribing to topics, or "pub/sub". Multiple clients connect to a broker and subscribe to topics that they are interested in. Clients also connect to the broker and publish messages to topics. Many clients may subscribe to the same topics and do with the information as they please. The broker and MQTT act as a simple, common interface for everything to connect to.
Quality of Service
MQTT defines three levels of Quality of Service (QoS). The QoS defines how hard the broker/client will try to ensure that a message is received.
Implemented levels are :
- 0: The broker/client will deliver the message once, with no confirmation.
- 1: The broker/client will deliver the message at least once, with confirmation required.
- 2: The broker/client will deliver the message exactly once by using a four step handshake.
On connection, a client sets the "clean session" flag, which is sometimes also known as the "clean start" flag. If clean session is set to false, then the connection is treated as durable. This means that when the client disconnects, any subscriptions it has will remain and any subsequent QoS 1 or 2 messages will be stored until it connects again in the future. If clean session is true, then all subscriptions will be removed for the client when it disconnects.
Limitation : Persistency of sessions is not implemented yet on the client side (this library)
Retained Messages
All messages may be set to be retained. This means that the broker will keep the message even after sending it to all current subscribers.
Last Will Testament
When a client connects to a broker, it may inform the broker that it has a will. This is a message that it wishes the broker to send when the client disconnects unexpectedly.
Version 1.0
This is the first release. It is provided with a very basic sample test App.
The use is totally free, with no limitation.
Utilisation
Connect to a broker (here iot.eclipse.org)
B4X:
MyMQTT.Connect("iot.eclipse.org","1883", "test", "", "", "/android/", "dead", 0, False, True, 60)
Events :
Methods :
test App :
it is limited to :
- connect/disconnect to broker and pinging to test connection
- sending/receiving messages
- subscribing/unsubscribing to topics
- selecting QoS
Enjoy !
And give me your feedback