You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/iot-operations/discover-manage-assets/howto-configure-opc-ua.md
+73-8Lines changed: 73 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -435,7 +435,7 @@ Now you can define the events associated with the event group. To add OPC UA eve
435
435
436
436
# [Azure CLI](#tab/cli)
437
437
438
-
To add an event group and events to an existing asset, use the `az iot ops ns asset opcua event-group` and `az iot ops ns asset custom event` commands:
438
+
To add an event group and events to an existing asset, use the `az iot ops ns asset opcua event-group` and `az iot ops ns asset opcua event` commands:
@@ -875,6 +874,72 @@ To delete individual resources by using Bicep, see [Deployment stacks](/azure/az
875
874
876
875
---
877
876
877
+
878
+
## Configure a shared endpoint
879
+
880
+
By default, each asset opens its own dedicated OPC UA session. You can configure a *shared* endpoint so that the connector uses a single session for all assets that reference the endpoint. To learn more about shared endpoints and when to use them, see [Shared endpoint mode](overview-opc-ua-connector.md#shared-endpoint-mode).
881
+
882
+
To enable shared mode, set `"shared": true` in the `additionalConfiguration` JSON of a device inbound endpoint:
883
+
884
+
```json
885
+
{
886
+
"properties": {
887
+
"endpoints": {
888
+
"inbound": {
889
+
"my-opcua-endpoint": {
890
+
"address": "opc.tcp://my-plc.my-namespace:4840",
891
+
"endpointType": "Microsoft.OpcUa",
892
+
"authentication": {
893
+
"method": "Anonymous"
894
+
},
895
+
"additionalConfiguration": "{\"shared\": true}"
896
+
}
897
+
}
898
+
}
899
+
}
900
+
}
901
+
```
902
+
903
+
If you omit the `shared` property from `additionalConfiguration`, the default value is `false` and each asset opens its own dedicated OPC UA session.
904
+
905
+
The `shared` flag is also supported on legacy `AssetEndpointProfile` resources. However, for new deployments, use the device/asset (namespaced) resource model.
906
+
907
+
Multiple assets can then reference the same shared endpoint:
Copy file name to clipboardExpand all lines: articles/iot-operations/discover-manage-assets/howto-control-opc-ua.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -376,7 +376,7 @@ The response to a successfully executed request is a message that contains all t
376
376
377
377
Endpoint operations are process control calls that work on an inbound endpoint only. They don't need an asset.
378
378
379
-
For example, to dump the address space of an OPC UA server, send a message to the topic `azure-iot-operations/endpoint-operations/{InboundEndpointName}/browse`.
379
+
For example, to dump the address space of an OPC UA server, send a message to the topic `azure-iot-operations/endpoint-operations/{DeviceName}/{EndpointName}/{ActionName}`.
380
380
381
381
If the payload contains an empty JSON object, the entire address space is returned.
Copy file name to clipboardExpand all lines: articles/iot-operations/discover-manage-assets/overview-opc-ua-connector.md
+62Lines changed: 62 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -55,6 +55,7 @@ The connector for OPC UA supports the following features as part of Azure IoT Op
55
55
| Payload compression | Yes | Supports `gzip` and `brotli`|
56
56
|[Dynamic node resolution](#resolve-nodes-dynamically-by-using-browse-paths)| Yes | Using `TranslateBrowsePathToNodeId` service |
57
57
| State store synchronization | Yes | Sync OPC UA node properties to distributed state store |
58
+
|[Shared endpoint mode](#shared-endpoint-mode)| Yes | Multiple assets share a single OPC UA session |
58
59
|[Key frame generation](#understand-key-frames-for-opc-ua-data-points)| Yes | Enables downstream services to recover state more quickly |
59
60
60
61
## How it works
@@ -97,6 +98,67 @@ To configure this behavior, select **Sync properties into state store** when you
97
98
98
99
You can also force a synchronization of all properties by making an MQTT RPC call to the `azure-iot-operation/asset-operations/{AssetName}/builtin/syncProperties` topic. A payload `{}` forces a synchronization without observing `ModelChange` events. A payload `{"observeModelChanges": true}` forces a synchronization that observes `ModelChange` events.
99
100
101
+
## Shared endpoint mode
102
+
103
+
By default, each asset that connects to an OPC UA server opens its own independent OPC UA session. This default behavior is called *dedicated* mode.
104
+
105
+
When you set the `shared` flag to `true` on a device's inbound endpoint, the connector establishes a single OPC UA session for the endpoint and reuses it across all assets that reference that endpoint. This behavior is called *shared* mode.
Asset B → Session B Asset B ──┼─→ Session (shared)
112
+
Asset C → Session C Asset C ─┘
113
+
(3 sessions to the server) (1 session to the server)
114
+
```
115
+
116
+
### When to use shared mode
117
+
118
+
Use shared mode when:
119
+
120
+
- The OPC UA server enforces a low session limit, for example a PLC that allows only a few simultaneous connections.
121
+
- You have many assets pointing to the same server and want to minimize the connection footprint.
122
+
- You want to reduce resource consumption (memory, TCP connections, licensing) on the OPC UA server.
123
+
124
+
The `shared` flag is independent of the authentication method. The single shared session uses whichever authentication method you configure on the endpoint. Telemetry payload, topic structure, and message schema are identical regardless of session mode.
125
+
126
+
You can mix shared and dedicated assets on the same device. Create separate endpoints, for example `my-opcua-endpoint-shared` and `my-opcua-endpoint-dedicated`, each with its own `shared` flag. Assets reference a specific endpoint by name through `deviceRef.endpointName`.
127
+
128
+
### Constraints and trade-offs
129
+
130
+
| Aspect | Dedicated mode | Shared mode |
131
+
|---|---|---|
132
+
| Sessions to server | One per asset | One per endpoint |
133
+
| Server session limit impact | High | Low |
134
+
| Isolation between assets | Full (each asset has its own session) | None (all assets share the same session) |
135
+
| Session disconnect impact | Only the affected asset reconnects | All assets on the endpoint are affected |
136
+
| Certificate update | Each asset reconnects independently | The single shared session is recreated; all assets on the endpoint are briefly interrupted |
137
+
138
+
> [!IMPORTANT]
139
+
> When the shared OPC UA session disconnects because of a network failure, server restart, or certificate rotation, all assets that reference the endpoint temporarily lose telemetry until the session is reestablished.
140
+
141
+
### Shared endpoint lifecycle
142
+
143
+
1. When you create or update a device resource, the connector reads the `shared` flag.
144
+
1. If `shared` is `true`, the connector opens one OPC UA session before any asset connects. The endpoint transitions to the `Shared` state.
145
+
1. When an asset connects, its `ConnectedAsset` record links to the existing session—no second session opens.
146
+
1. When you remove an asset, the OPC UA session stays open for other assets. Only the removed asset's subscriptions are torn down.
147
+
1. When you delete or update the device, the shared session disconnects and all linked assets are requeued.
148
+
149
+
If you change `shared` from `true` to `false` on a running device, the connector disconnects the shared session and requeues all affected assets. Each asset then establishes its own dedicated session. Expect a brief interruption in telemetry.
150
+
151
+
### Health states for shared endpoints
152
+
153
+
- The **InboundEndpoint** health state reports `Available` or `Unavailable` for the single shared session.
154
+
- Each **Asset** health state also reports `Available` or `Unavailable`. Because all assets share the same session, a session drop marks all linked assets as `Unavailable` simultaneously.
155
+
156
+
### Certificate rotation for shared endpoints
157
+
158
+
When the connector's application certificate is renewed, it recreates the secure channel of the shared session once. All assets on the endpoint are briefly interrupted, then automatically recover without requiring individual reconnects.
159
+
160
+
To learn how to configure a shared endpoint, see [Configure a shared endpoint](howto-configure-opc-ua.md#configure-a-shared-endpoint).
161
+
100
162
## Connector for OPC UA message format
101
163
102
164
The connector for OPC UA publishes messages from OPC UA servers to the MQTT broker as JSON. Each message has a payload and a collection of properties that are part of the MQTT user properties section. The payload contains the messages from the OPC UA server, and the properties provide metadata.
0 commit comments