The code sample demonstrates the creation of an Amazon MQ broker using AWS CDK and provides a client sample for MQTT communication in Python.
Create a multi-AZ configuration for VPC and an Active/Standby configuration for Amazon MQ Broker.
cdk/lib/constrcuts/network.ts
: VPC, Subnet, Security Groupcdk/lib/constrcuts/mqttBroker.ts
: Amazon MQ Broker
Paho MQTT clients for publishing and subscribing.
python/mqtt_helper.py
: MQTT client helper class.python/publisher.py
: MQTT publisher.python/subscriber.py
: MQTT subscriber.