Skip to content

Commit b6f1684

Browse files
committed
Content placement
1 parent e71c548 commit b6f1684

File tree

1 file changed

+14
-8
lines changed

1 file changed

+14
-8
lines changed

articles/iot-operations/manage-mqtt-broker/howto-configure-brokerlistener.md

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ To view or edit the default listener:
5757

5858
# [Bicep](#tab/bicep)
5959

60-
You shouldn't modify the default listener using Bicep.
60+
Be careful when modifying the default listener using Bicep. Don't change the existing settings. Instead, add more ports to the default listener. The following example shows how to add a new port to the default listener.
6161

6262
```bicep
6363
param aioInstanceName string = '<AIO_INSTANCE_NAME>'
@@ -76,7 +76,7 @@ resource defaultBroker 'Microsoft.IoTOperations/instances/brokers@2024-09-15-pre
7676
name: 'default'
7777
}
7878
79-
resource nodePortListener 'Microsoft.IoTOperations/instances/brokers/listeners@2024-09-15-preview' = {
79+
resource defaultListener 'Microsoft.IoTOperations/instances/brokers/listeners@2024-09-15-preview' = {
8080
parent: defaultBroker
8181
name: 'default'
8282
extendedLocation: {
@@ -108,7 +108,11 @@ resource nodePortListener 'Microsoft.IoTOperations/instances/brokers/listeners@2
108108
}
109109
}
110110
}
111-
// Add more ports here
111+
// Add more ports here, like the following example
112+
{
113+
port: 1884
114+
protocol: 'Mqtt'
115+
}
112116
]
113117
}
114118
}
@@ -159,18 +163,20 @@ spec:
159163
rotationPolicy: Always
160164
```
161165
162-
To learn more about the default BrokerAuthentication resource linked to this listener, see [Default BrokerAuthentication resource](howto-configure-authentication.md#default-brokerauthentication-resource).
163-
164-
### Update the default broker listener
165-
166-
The default *BrokerListener* uses the service type *ClusterIp*. You can have only one listener per service type. If you want to add more ports to service type *ClusterIp*, you can update the default listener to add more ports. For example, you could add a new port 1883 with no TLS and authentication off with the following kubectl patch command:
166+
To add a new port 1883 with no TLS and authentication off to the default listener, use the `kubectl patch` command:
167167

168168
```bash
169169
kubectl patch brokerlistener default -n azure-iot-operations --type='json' -p='[{"op": "add", "path": "/spec/ports/-", "value": {"port": 1883, "protocol": "Mqtt"}}]'
170170
```
171171

172172
---
173173

174+
### Update the default broker listener
175+
176+
To avoid disrupting internal Azure IoT Operations communication, keep the default listener unchanged and dedicated for internal use. For external communication, [create a new listener](#create-new-broker-listeners).
177+
178+
Since the default *BrokerListener* uses the service type *ClusterIp*, and you can have [only one listener per service type](#service-type), add more ports to the default listener without changing any of the existing settings if you need to use the *ClusterIp* service.
179+
174180
## Create new broker listeners
175181

176182
To create a new listener, you need to specify the following settings:

0 commit comments

Comments
 (0)