Skip to content

Commit

Permalink
aligning all examples with same mqtt client settings
Browse files Browse the repository at this point in the history
When 'is_ssl' is true in MQTT (as is required by AWS IoT), the MQTT port is automatically set to 8883.
  • Loading branch information
jersu11 committed May 19, 2024
1 parent b7a55b6 commit e9565b2
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions examples/aws_iot_native_networking.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
# "device_cert_path" - Path to the Device Certificate from AWS IoT ("<THING_NAME>.cert.pem")
# "device_key_path" - Path to the RSA Private Key from AWS IoT ("<THING_NAME>.private.key")
# "broker" - The endpoint for the AWS IoT broker ("<PREFIX>.iot.<REGION>.amazonaws.com")
# "port" - The port for the "broker" above (8883)
# "client_id" - The client id. Your device's Policy needs to allow this client ("basicPubSub")
#
# pylint: disable=no-name-in-module,wrong-import-order
Expand Down Expand Up @@ -93,9 +92,8 @@ def message(client, topic, msg):
# Set up a MiniMQTT Client
mqtt_client = MQTT.MQTT(
broker=secrets["broker"],
port=secrets["port"],
is_ssl=True, # ssl is required
client_id=secrets["client_id"],
is_ssl=True,
socket_pool=pool,
ssl_context=ssl_context,
)
Expand Down

0 comments on commit e9565b2

Please sign in to comment.