• Skip to main content
  • Skip to footer

B4X

Develop Android, iOS and IoT applications

  • Home
  • Products
    • B4A (Android)
    • B4i (iOS)
    • B4J (Desktop)
    • B4R (Arduino)
  • Showcase
  • Store
  • Learn
    • General
    • Guides
    • Video Tutorials
    • Glossary
  • Teach
  • Blog
  • Community
A B C D F G H J M N Q S T U X

All

MQTT

MQTT – Message Queuing Telemetry Transport, is an application level network protocol for simple and lightweight network communication.
The communication in MQTT is done between multiple clients. There is no server component. There is a broker component. The broker is a “black box” that handles the clients. It just needs to run.

Whenever you find yourself implementing a solution based on TCP sockets, stop for a moment and give MQTT a try. It is likely to be simpler and in most cases work better.

MQTT is a publish-subscribe protocol. Clients subscribe to various topics and clients publish messages to a topic. The broker is responsible for distributing the messages to all subscribed clients.

MQTT clients libraries are available for all B4X products. There are broker libraries available for B4A and B4J. You can also run any other broker implementation including internet based, cloud brokers.

MQTT tutorial: https://www.b4x.com/android/forum/threads/iot-mqtt-protocol.59471/#content
Code to make a connection and try to reconnect when needed: https://www.b4x.com/android/forum/threads/b4x-mqtt-connect-reconnect.80815/#content

Written by Erel Uziel

Footer

Top

  • Home
  • Products
    • B4A (Android)
    • B4i (iOS)
    • B4J (Desktop)
    • B4R (Arduino)
  • Showcase
  • Store
  • Learn
    • General
    • Guides
    • Video Tutorials
    • Glossary
  • Teach
  • Blog
  • Community

About us

Follow us:

Latest Versions

B4A v10.7 (changelog)
B4i v7.20 (changelog)
B4J v8.90 (changelog)
B4R v3.70 (changelog)

Contact Us

support@basic4ppc.com

Privacy Policy

Privacy Policy

Copyright © 2021 · Anywhere Software. Android is a trademark of Google Inc. iOS is a registered trademark of Apple. Arduino is a trademark of Arduino. Java is a trademark of Oracle.