Skip to content

Commit 6c87fa2

Browse files
[.NET][Akri] full client Id provided by akri now, not just client id prefix (#802)
1 parent 9aefe94 commit 6c87fa2

File tree

2 files changed

+1
-8
lines changed

2 files changed

+1
-8
lines changed

dotnet/src/Azure.Iot.Operations.Connector/Configurations/ConnectorFileMountSettings.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public class ConnectorFileMountSettings
1313
public const string ConnectorConfigMountPathEnvVar = "CONNECTOR_CONFIGURATION_MOUNT_PATH";
1414
public const string BrokerTrustBundleMountPathEnvVar = "BROKER_TLS_TRUST_BUNDLE_CACERT_MOUNT_PATH";
1515
public const string BrokerSatMountPathEnvVar = "BROKER_SAT_MOUNT_PATH";
16-
public const string ConnectorClientIdEnvVar = "CONNECTOR_CLIENT_ID_PREFIX";
16+
public const string ConnectorClientIdEnvVar = "CONNECTOR_ID";
1717

1818
public const string ConnectorMqttConfigFileName = "MQTT_CONNECTION_CONFIGURATION";
1919
public const string ConnectorAioMetadataFileName = "AIO_METADATA";

dotnet/src/Azure.Iot.Operations.Connector/ConnectorWorker.cs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -104,13 +104,6 @@ protected override async Task ExecuteAsync(CancellationToken cancellationToken)
104104
}
105105
}
106106

107-
if (_leaderElectionConfiguration != null)
108-
{
109-
// Connector client id prefix is provided as environment variable, but it is the same prefix for all replicated pods.
110-
// To avoid collision, add a suffix when replicating pods.
111-
mqttConnectionSettings!.ClientId += Guid.NewGuid().ToString();
112-
}
113-
114107
_logger.LogInformation("Connecting to MQTT broker");
115108

116109
await _mqttClient.ConnectAsync(mqttConnectionSettings!, cancellationToken);

0 commit comments

Comments
 (0)