Skip to content

Commit e9565b2

Browse files
committed
aligning all examples with same mqtt client settings
When 'is_ssl' is true in MQTT (as is required by AWS IoT), the MQTT port is automatically set to 8883.
1 parent b7a55b6 commit e9565b2

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

examples/aws_iot_native_networking.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
# "device_cert_path" - Path to the Device Certificate from AWS IoT ("<THING_NAME>.cert.pem")
1818
# "device_key_path" - Path to the RSA Private Key from AWS IoT ("<THING_NAME>.private.key")
1919
# "broker" - The endpoint for the AWS IoT broker ("<PREFIX>.iot.<REGION>.amazonaws.com")
20-
# "port" - The port for the "broker" above (8883)
2120
# "client_id" - The client id. Your device's Policy needs to allow this client ("basicPubSub")
2221
#
2322
# pylint: disable=no-name-in-module,wrong-import-order
@@ -93,9 +92,8 @@ def message(client, topic, msg):
9392
# Set up a MiniMQTT Client
9493
mqtt_client = MQTT.MQTT(
9594
broker=secrets["broker"],
96-
port=secrets["port"],
97-
is_ssl=True, # ssl is required
9895
client_id=secrets["client_id"],
96+
is_ssl=True,
9997
socket_pool=pool,
10098
ssl_context=ssl_context,
10199
)

0 commit comments

Comments
 (0)