Skip to content

Commit a3ab67a

Browse files
Device client registration timeout less than MQTT timeout. Information just before entering to the Azure SDK device client registration method. New spring, iot-service-client and iot-device-client. Code Cleanup.
1 parent 5cd28ab commit a3ab67a

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>org.springframework.boot</groupId>
66
<artifactId>spring-boot-starter-parent</artifactId>
7-
<version>3.2.3</version>
7+
<version>3.2.12</version>
88
<relativePath /> <!-- lookup parent from repository -->
99
</parent>
1010
<groupId>com.orange.lo.sample.lo2iot</groupId>
@@ -41,7 +41,7 @@
4141
<dependency>
4242
<groupId>com.microsoft.azure.sdk.iot</groupId>
4343
<artifactId>iot-service-client</artifactId>
44-
<version>2.1.7</version>
44+
<version>2.1.9</version>
4545
</dependency>
4646
<dependency>
4747
<groupId>org.springframework.boot</groupId>
@@ -51,7 +51,7 @@
5151
<dependency>
5252
<groupId>com.microsoft.azure.sdk.iot</groupId>
5353
<artifactId>iot-device-client</artifactId>
54-
<version>2.4.1</version>
54+
<version>2.5.0</version>
5555
</dependency>
5656
<dependency>
5757
<groupId>com.microsoft.azure</groupId>

src/main/java/com/orange/lo/sample/lo2iothub/azure/MultiplexingClientManager.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,8 @@ private void registerDeviceClientsAsMultiplexed() {
145145
if (!deviceClientManagersToRegister.isEmpty()) {
146146
List<DeviceClient> deviceClientList = deviceClientManagersToRegister.stream().map(dcm -> dcm.getDeviceClient()).collect(Collectors.toList());
147147
try {
148-
this.multiplexingClient.registerDeviceClients(deviceClientList);
148+
LOG.info("Starts device clients registration {} for multiplexing client: {}", deviceClientManagersToRegister.stream().map(dcm -> dcm.getDeviceClient().getConfig().getDeviceId()).collect(Collectors.toSet()), multiplexingClientId);
149+
this.multiplexingClient.registerDeviceClients(deviceClientList, 25000L);
149150
this.multiplexedDeviceClientManagers.putAll(deviceClientManagersToRegister.stream().collect(Collectors.toMap(dcm -> dcm.getDeviceClient().getConfig().getDeviceId() , dcm -> dcm)));
150151
LOG.info("Registered device clients {} for multiplexing client: {}", deviceClientManagersToRegister.stream().map(dcm -> dcm.getDeviceClient().getConfig().getDeviceId()).collect(Collectors.toSet()), multiplexingClientId);
151152
deviceClientManagersToRegister.clear();

src/main/java/com/orange/lo/sample/lo2iothub/lo/LoCommandSender.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@
1010
import com.fasterxml.jackson.databind.ObjectMapper;
1111
import com.microsoft.azure.sdk.iot.device.IotHubMessageResult;
1212
import com.orange.lo.sample.lo2iothub.exceptions.CommandException;
13-
import com.orange.lo.sdk.LOApiClient;
14-
import com.orange.lo.sdk.rest.devicemanagement.Commands;
15-
import com.orange.lo.sdk.rest.devicemanagement.DeviceManagement;
1613
import com.orange.lo.sdk.rest.model.CommandAddRequest;
1714

1815
import java.lang.invoke.MethodHandles;

0 commit comments

Comments
 (0)