← Back to list

Install Emqx and create sub and connections for IOT

EMQX (formerly known as EMQTT) is an open-source, highly scalable, distributed MQTT message broker written in Erlang/OTP. It is designed…

Abdallah rabie · 2024-07-10 10:06 · 0 claps · 2.6 min read
#iot #emq-x #mqtt #broker
Open on Medium ↗
Wiki topics: 📟 · Gadgets & IoT 🔓 · Open Source

Install Emqx and create sub and connections for IOT

EMQX (formerly known as EMQTT) is an open-source, highly scalable, distributed MQTT message broker written in Erlang/OTP. It is designed for handling massive amounts of MQTT connections and messages efficiently.

mqtt with emqx

Whats is mqtt?

  • MQTT (Message Queuing Telemetry Transport) is a lightweight messaging protocol designed for constrained devices and low-bandwidth, high-latency or unreliable networks. It is commonly used in IoT (Internet of Things) and M2M (Machine-to-Machine) communications due to its simplicity and efficiency. Key Features of MQTT:
  • Lightweight: MQTT is designed to be lightweight both in terms of bandwidth usage and implementation complexity. This makes it suitable for devices with limited resources, such as sensors and embedded systems.
  • Publish-Subscribe Architecture: MQTT uses a publish-subscribe messaging pattern where clients (devices or applications) can publish messages to topics. Other clients can subscribe to these topics to receive messages.
  • Quality of Service (QoS): MQTT supports different levels of QoS to ensure message delivery reliability: QoS 0 (At most once): The message is delivered at most once or not at all. QoS 1 (At least once): The message is delivered at least once, ensuring no message loss but may result in duplicates. QoS 2 (Exactly once): The message is delivered exactly once by using a handshake mechanism to confirm delivery.

install in ubuntu

sudo apt update && sudo apt install -y \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common
  • curl -fsSL https://repos.emqx.io/gpg.pub | sudo apt-key add -
  • sudo apt-key fingerprint 3E640D53
sudo add-apt-repository \
"deb [arch=amd64] https://repos.emqx.io/emqx-ce/deb/ubuntu/ \$(lsb_release -cs) \
stable"
  • sudo apt install emqx
  • sudo emqx start

Install mqtt Client (MQTTX)

  • I used x86–64 | v1.10.0.deb
  • use this command to install the file after download sudo dpkg -i <File_Name>
  • Open it with writing mqttx in terminal

mqttx create Topics

  • Press new connection enter the name and the ip of the device that used to lanuch emqx

  • Press new Subscription I will make 2 subs Temp and Numbers as shown

Create another client with Smart phone

  • Add the broker data

  • Connect
  • Go to publish button
  • Write the Topic and message
  • Press Publish

  • The data appears in the mqttx client


메타데이터
post_id
cdeb4f87d760
slug
install-emqx-and-create-sub-and-connections-for-iot-cdeb4f87d760
url
https://medium.com/@abdallahrabie45/install-emqx-and-create-sub-and-connections-for-iot-cdeb4f87d760
canonical_url
https://medium.com/@abdallahrabie45/install-emqx-and-create-sub-and-connections-for-iot-cdeb4f87d760
author_url
https://medium.com/@abdallahrabie45
status
ok
fetched_at
2026-06-27 18:20:27