Generate MQTT service
For example, imagine a simple network with three clients and a central broker.
All three clients open TCP connections with the broker. Clients B and C subscribe to the topic temperature.

At a later time, Client A publishes a value of 22.5 for topic temperature . The broker forwards the message to all subscribed clients.

The publisher subscriber model allows MQTT clients to communicate one-to-one, one-to-many and many-to-one.
You can scaffold this exact publisher/subscriber topology in your language of choice:
# Generate temperature service demo
python3 main.py create --name temp_service --type paho --role both --scope demo --output ./services/
# Start subscriber (Clients B & C)
cd ./services/temp_service && bash run_subscriber.sh
# Publish temperature readings (Client A)
cd ./services/temp_service && bash run_publisher.sh
# Generate C service demo
python3 main.py create --name temp_c --type mosquitto --role both --scope demo --output ./services/
# Build and run
cd ./services/temp_c && make
./build/subscriber &
./build/publisher
# Generate Node.js service demo
python3 main.py create --name temp_node --type node --role both --scope demo --output ./services/
# Install and run
cd ./services/temp_node && npm install
bash run_subscriber.sh &
bash run_publisher.sh
For complete technical details on project layouts, factories, and architectural patterns, see the Templates Architecture & Usage Guide.