• About
  • Advertise
  • Contact
Saturday, April 4, 2026
No Result
View All Result
NEWSLETTER
iotwashington
  • Home
  • Internet of Things
  • Security
  • WAN
  • Cloud Computing
  • Data Centers
  • Mobile
  • Networking
  • Software
  • Home
  • Internet of Things
  • Security
  • WAN
  • Cloud Computing
  • Data Centers
  • Mobile
  • Networking
  • Software
No Result
View All Result
iotwashington
No Result
View All Result
Home Internet of Things

Internet of Things Messaging, Part 2: The Mosquitto MQTT broker

in Internet of Things
Internet of Things Messaging, Part 2: The Mosquitto MQTT broker
0
SHARES
21
VIEWS
Share on FacebookShare on Twitter

MQTT is a messaging technology for machine-to-machine communication that’s lightweight and relatively simple to implement on pretty much any device. In my first post on MQTT I covered the basics and background of the protocol and threatened to follow up with a discussion of Mosquitto, a free, open source MQTT server (the MQTT developers no longer call them “brokers”) that’s one of the most widely used messaging platforms in the Internet of Things world. Being a man of my word, here goes …

The Mosquitto broker (apparently the Mosquito developers and MQTT developers do not see eye-to-eye on terminology) is part of the Eclipse IoT Working Group, “an industry collaboration of companies who invest and promote an open source community for IoT.” Mosquito currently supports MQTT versions 3.1 and 3.1.1 and support for the proposed MQTT v5, which introduces scalability and protocol improvements is under way.

Installing Mosquitto is straightforward on most systems including the Raspberry Pi under Raspbian. My test setup for IoT experiments is based on Debian virtual machines which I built on a QNAP TS-871T under QNAP’s Virtualization Station. While there are a number of prebuilt Debian VM appliances available including some with Mosquitto installed, I prefer to use a VM I’ve created so that I know that it’s a minimal base system that I can easily rebuild if (when) I mess it up and that there’s nothing in the VM that I don’t know about.

screen shot 2Mark Gibbs

QNAP HTML-based remote desktop showing the installation of Mosquitto on a Debian VM running under QNAP’s Virtualization Station.

Installing Mosquitto under Debian 8.7 is simple. On the command line enter:

sudo apt-get update

sudo apt-get install mosquitto

And, bam! Mosquitto is installed and, should the gods smile on you, it will be up and running. That is, up and running if you’re on vanilla Debian. For other configurations and operating systems you may have to enter:

mosquitto -c /etc/mosquitto/mosquitto.conf &

Want to find Mosquitto’s process ID (pid)? Mosquitto will be running as the user mosquitto so you’ll need to enter:

ps auxm | grep mosquitto

Starting, restarting, and stopping Mosquitto?

service mosquitto operation>

Where operation> is start, restart, or stop.

Configuring Mosquitto is a little more complicated than installation. Okay, make that a lot more complicated. The default configuration file can be found at/etc/mosquitto/mosquitto.conf although if the file doesn’t exist, Mosquitto will assume the same values you’ll find in the default configuration file. There are lots of options and parameters to set and if you’re not on a secured network (and, some might argue, even if you are) you should at least configure Mosquitto to require subscribers and publishers to authenticate and for your MQTT traffic to run over TLS (see MQTT TLS Security – Mosquitto Broker Configuration for a tutorial on how to lock down your installation).

For the purposes of this series we’ll stick with the default unsecured configuration. So now we’ve got a basic installation of Mosquitto running, we need to test it, which we’ll do in the next installment.

Comments? Thoughts? Drop me a line or comment below then follow me on Twitter and Facebook. And sign up for my new newsletter!

Join the Network World communities on Facebook and LinkedIn to comment on topics that are top of mind.
Download WordPress Themes Free
Download Premium WordPress Themes Free
Premium WordPress Themes Download
Free Download WordPress Themes
free download udemy paid course
download karbonn firmware
Download Nulled WordPress Themes
udemy course download free
Tags: Internet of Things MessagingPart 2: The Mosquitto MQTT broker
Next Post

How to choose an IoT radio network

Recommended

Sony targets IoT with acquisition of chip company Altair

7 ways to make your IoT-connected Raspberry Pi smarter

Facebook Twitter Youtube RSS

Newsletter

Subscribe our Newsletter for latest updates.

Loading

Category

  • AI
  • Careers
  • Cloud Computing
  • Connected Cars
  • Connected Vehicles
  • Data & Analytics
  • Data Center
  • Data Centers
  • Databases
  • Development
  • Enterprise
  • Hardware
  • Healthcare
  • IIoT
  • Infrastructure
  • Internet of Things
  • IoT
  • IT Leadership
  • Manufacturing
  • Mobile
  • Networking
  • Oil & Gas
  • Open Source
  • Security
  • Smart Cities
  • Smart Homes
  • Software
  • Software Development
  • Standards
  • Technology Industry
  • Uncategorized
  • Unified Communications
  • Virtualization
  • WAN
  • Wearables

About Us

Advance IOT information site of Washington USA

© 2024 iotwashington.com.

No Result
View All Result
  • Home
  • Internet of Things
  • Security
  • WAN
  • IoT
  • Cloud Computing
  • Data Centers
  • Mobile
  • Networking
  • Software

© 2024 iotwashington.com.

Login to your account below

Forgotten Password?

Fill the forms bellow to register

All fields are required. Log In

Retrieve your password

Please enter your username or email address to reset your password.

Log In