Skip to content

Commit 42c15ad

Browse files
Merge pull request #33 from DatavenueLiveObjects/new-FIFO_SDK-java-and-libs
New fifo sdk, java and libs
2 parents 53eea6a + 5438514 commit 42c15ad

File tree

6 files changed

+92
-90
lines changed

6 files changed

+92
-90
lines changed

.github/workflows/manual_release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ jobs:
77
build:
88
runs-on: ubuntu-latest
99
steps:
10-
- uses: actions/checkout@v2
10+
- uses: actions/checkout@v4
1111

1212
- name: Create tag by maven-release plugin
13-
uses: qcastel/[email protected].2
13+
uses: qcastel/[email protected].41
1414
with:
1515
release-branch-name: "master"
1616
git-release-bot-name: "auto"

.github/workflows/on_commit.yml renamed to .github/workflows/on_push.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@ jobs:
88
runs-on: ubuntu-latest
99

1010
steps:
11-
- uses: actions/checkout@v2
12-
- name: Set up JDK 1.8
13-
uses: actions/setup-java@v1
11+
- uses: actions/checkout@v4
12+
- name: Set up JDK
13+
uses: actions/setup-java@v2
1414
with:
15-
java-version: 1.8
15+
distribution: 'zulu'
16+
java-version: '21'
1617
- name: Build with Maven
1718
run: mvn clean test --file pom.xml

README.md

Lines changed: 60 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,12 @@ The software is an open source toolbox which has to be integrated into an end to
2828
Live Objects platform supports load balancing between multiple MQTT subscribers.
2929

3030
## Technologies
31-
* Java 8
32-
* Spring Boot 2.4.4
33-
* Microsoft Azure SDK IoT 1.22.0
34-
* Microsoft Application Insights Java SDK Spring Boot Starter 2.5.1
35-
* Azure Metrics Spring Boot Starter 2.2.1
31+
* Java 21
32+
* Spring Boot 3.2.3
33+
* Microsoft Iot Hub Java Service SDK 2.1.7
34+
* Microsoft IoT Hub Java Device Client 2.4.1
35+
* Microsoft Application Insights Java SDK Spring Boot Starter 2.6.4
36+
* Azure Metrics Spring Boot Starter 2.3.5
3637

3738
## Requirements
3839
In order to run the connector you need to have:
@@ -42,8 +43,8 @@ In order to run the connector you need to have:
4243
* **Application Insights resource created (per each Iot Hub)** (creation process is described in official [documentation](https://docs.microsoft.com/pl-pl/azure/azure-monitor/app/create-new-resource))
4344
* **App Service plan created (per each Iot Hub)** (creation process is described in official [documentation](https://docs.microsoft.com/en-us/azure/app-service/app-service-plan-manage))
4445
* **Development tools (only when building the package)**
45-
* **Java SE Development Kit 8**
46-
* **Apache Maven**
46+
* **Java SE Development Kit 21**
47+
* **Apache Maven**
4748

4849
## Getting the installation package
4950

@@ -87,52 +88,51 @@ All configuration can be found in **application.yaml** file located in src/main/
8788
8 qos: 1
8889
9 keep-alive-interval-seconds: 30
8990
10 page-size: 20
90-
11 synchronization-device-interval: 10
91-
12 mqtt-persistence-dir: ${basedir:.}/temp/
92-
13
93-
14 azure-iot-hub-list:
94-
15 -
95-
16 iot-connection-string: YOUR_IOT_CONNECTION_STRING
96-
17 iot-host-name: YOUR_IOT_HOST_NAME
97-
18 synchronization-thread-pool-size: 40
98-
19 device-client-connection-timeout: 5000
99-
20 tagPlatformKey: platform
100-
21 tagPlatformValue: LiveObjectsGroupIoT1
101-
22
102-
23 lo-messages-topic: MESSAGES_TOPIC
103-
24 lo-devices-topic: DEVICES_TOPIC
104-
25 lo-devices-group: DEVICES_GROUP
105-
26
106-
27 -
107-
28 iot-connection-string: YOUR_IOT_CONNECTION_STRING
108-
29 iot-host-name: YOUR_IOT_HOST_NAME
109-
30 synchronization-thread-pool-size: 40
110-
31 device-client-connection-timeout: 5000
111-
32 tagPlatformKey: platform
112-
33 tagPlatformValue: LiveObjectsGroupIoT1
113-
34
114-
35 lo-messages-topic: MESSAGES_TOPIC
115-
36 lo-devices-topic: DEVICES_TOPIC
116-
37 lo-devices-group: DEVICES_GROUP
117-
38
118-
39 azure:
119-
40 application-insights:
120-
41 instrumentation-key: YOUR_INSTMENTATION_KEY
121-
42 channel:
122-
43 in-process:
123-
44 developer-mode: true
124-
45 max-telemetry-buffer-capacity: 500
125-
46 flush-interval-in-seconds: 5
126-
47
127-
48 management:
128-
49 endpoints:
129-
50 web:
130-
51 exposure:
131-
52 include: "*"
132-
53
133-
54 spring:
134-
55 application:
135-
56 name: Lo2IotHub
91+
11 device-synchronization: true
92+
12 device-synchronization-interval: 86400 # in seconds - 24h
93+
13 mqtt-persistence-dir: ${basedir:.}/temp/
94+
14
95+
15 azure-iot-hub-list:
96+
16 -
97+
17 iot-connection-string: YOUR_IOT_CONNECTION_STRING
98+
18 iot-host-name: YOUR_IOT_HOST_NAME
99+
19 device-registration-thread-pool-size: 10
100+
20 device-registration-period: 200 # in milliseconds - 200ms
101+
21 device-reestablish-session-delay: 10000 # in milliseconds - 10s
102+
22 device-client-connection-timeout: 5000
103+
23 message-expiry-time: 60000 # in milliseconds - 60s
104+
24 message-send-max-attempts: 10
105+
25 message-resend-delay: 10000 # in milliseconds - 10s
106+
26 tagPlatformKey: platform
107+
27 tagPlatformValue: LiveObjectsGroupIoT1
108+
28
109+
29 lo-messages-topic: MESSAGES_TOPIC
110+
30 lo-devices-topic: DEVICES_TOPIC
111+
31 lo-devices-group: DEVICES_GROUP
112+
32
113+
33 -
114+
34 iot-connection-string: YOUR_IOT_CONNECTION_STRING
115+
35 iot-host-name: YOUR_IOT_HOST_NAME
116+
36 device-registration-thread-pool-size: 10
117+
37 device-registration-period: 200 # in milliseconds - 200ms
118+
38 device-reestablish-session-delay: 10000 # in milliseconds - 10s
119+
39 device-client-connection-timeout: 5000
120+
40 message-expiry-time: 60000 # in milliseconds - 60s
121+
41 message-send-max-attempts: 10
122+
42 message-resend-delay: 10000 # in milliseconds - 10s
123+
43 tagPlatformKey: platform
124+
44 tagPlatformValue: LiveObjectsGroupIoT1
125+
45
126+
46 lo-messages-topic: MESSAGES_TOPIC
127+
47 lo-devices-topic: DEVICES_TOPIC
128+
48 lo-devices-group: DEVICES_GROUP
129+
49
130+
50 azure:
131+
51 application-insights:
132+
52 enabled: true
133+
53 instrumentation-key: YOUR_INSTMENTATION_KEY
134+
54
135+
...
136136
```
137137

138138
#### hostname
@@ -166,7 +166,7 @@ This value, measured in seconds, defines the maximum time interval between messa
166166
#### page-size
167167
Maximum number of devices in single response. Max 1000
168168

169-
#### synchronization-device-interval
169+
#### device-synchronization-interval
170170
Controls the interval (in seconds) at which device synchronization process starts.
171171

172172
#### iot-connection-string
@@ -179,8 +179,8 @@ The `iot-host-name` can be found in the details of IoT Hub:
179179

180180
![IoT Hub 1](./assets/iot_hub_1.png)
181181

182-
#### synchronization-thread-pool-size
183-
How many threads will be used in devices synchronization process
182+
#### device-registration-thread-pool-size
183+
How many threads will be used in devices registration process
184184

185185
#### device-client-connection-timeout
186186
The length of time, in milliseconds, that any given operation will expire in. These operations include reconnecting upon a connection drop and sending a message.
@@ -293,22 +293,22 @@ You can deploy this connector wherever you want (local server, cloud provider et
293293
```
294294
- Copy the file to the virtual machine ([documentation](https://docs.microsoft.com/pl-pl/azure/virtual-machines/linux/copy-files-to-linux-vm-using-scp)):
295295
```
296-
scp target/lo2iot-1.0.zip azureuser@YOUR_MACHINE_IP:~
296+
scp target/lo2iot-[VERSION].zip azureuser@YOUR_MACHINE_IP:~
297297
```
298298
- Install unzip and java
299299
```
300300
sudo apt-get install unzip
301301
```
302302
```
303-
sudo apt-get install openjdk-11-jdk -y
303+
sudo apt-get install openjdk-21-jdk -y
304304
```
305305
- Unpack the installation package:
306306
```
307-
unzip lo2iot-1.0.zip
307+
unzip lo2iot-[VERSION].zip
308308
```
309309
- Run `start.sh` script:
310310
```
311-
./lo2iot-1.0/bin/app.sh
311+
./lo2iot-[VERSION]/bin/app.sh
312312
```
313313

314314
If you want to stop and completely delete this machine you should run:

THIRD-PARTY.txt

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
COMPONENT | VERSION | LICENCE | URL
1+
COMPONENT | VERSION | LICENCE | URL
22
----------------------------------------------------------------------------------------------------------------------------------------------
3-
Spring Boot | 2.4.4 | Apache License | Version 2.0, https://www.apache.org/licenses/LICENSE-2.0
4-
Iot Hub Java Service SDK | 1.18.0 | MIT License | http://opensource.org/licenses/MIT
5-
IoT Hub Java Device Client | 1.18.0 | MIT License | http://opensource.org/licenses/MIT
6-
azure-eventhubs | 2.3.2 | MIT license | http://www.opensource.org/licenses/mit-license.php
7-
applicationinsights-spring-boot-starter | 2.5.1 | MIT License | http://www.opensource.org/licenses/mit-license.php
8-
azure-spring-boot-metrics-starter | 2.2.1 | MIT | https://github.com/Microsoft/azure-spring-b
9-
Apache Commons Text | 1.9 | Apache License 2.0 | http://www.apache.org/licenses/LICENSE-2.0.txt
10-
Failsafe | 2.4.0 | Apache License 2.0 | https://www.apache.org/licenses/LICENSE-2.0
11-
Spring Boot Starter Test | 2.4.4 | Apache License 2.0 | https://www.apache.org/licenses/LICENSE-2.0
12-
ArchUnit | 0.17.0 | Apache License | Version 2.0, https://www.apache.org/licenses/LICENSE-2.0
13-
ArchUnit | 0.17.0 | BSD | https://asm.ow2.io/license.html
3+
Spring Boot | 3.2.3 | Apache License 2.0 | https://www.apache.org/licenses/LICENSE-2.0
4+
Iot Hub Java Service SDK | 2.1.7 | MIT License | http://opensource.org/licenses/MIT
5+
IoT Hub Java Device Client | 2.4.1 | MIT License | http://opensource.org/licenses/MIT
6+
Application Insights Java SDK Spring Boot Starter | 2.6.4 | MIT License | http://www.opensource.org/licenses/mit-license.php
7+
Azure Metrics Spring Boot Starter | 2.3.5 | MIT License | http://opensource.org/licenses/MIT
8+
Maven Model | 3.9.6 | Apache License 2.0 | http://www.apache.org/licenses/LICENSE-2.0.txt
9+
Apache Commons Text | 1.11.0 | Apache License 2.0 | http://www.apache.org/licenses/LICENSE-2.0.txt
10+
Failsafe | 2.4.4 | Apache License 2.0 | https://www.apache.org/licenses/LICENSE-2.0
11+
Spring Boot Starter Test | 3.2.3 | Apache License 2.0 | https://www.apache.org/licenses/LICENSE-2.0
12+
ArchUnit | 1.2.1 | Apache License 2.0 | https://www.apache.org/licenses/LICENSE-2.0
13+
ArchUnit | 1.2.1 | Apache License 2.0, BSD | https://www.apache.org/licenses/LICENSE-2.0 https://asm.ow2.io/license.html

pom.xml

Lines changed: 11 additions & 11 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>2.7.0</version>
7+
<version>3.2.3</version>
88
<relativePath /> <!-- lookup parent from repository -->
99
</parent>
1010
<groupId>com.orange.lo.sample.lo2iot</groupId>
@@ -14,7 +14,7 @@
1414
<description>Connector between live object and azure IoT Hub</description>
1515

1616
<properties>
17-
<java.version>1.8</java.version>
17+
<java.version>21</java.version>
1818
</properties>
1919

2020
<repositories>
@@ -28,7 +28,7 @@
2828
<dependency>
2929
<groupId>com.github.DatavenueLiveObjects</groupId>
3030
<artifactId>FIFO_SDK_LiveObjects</artifactId>
31-
<version>v1.16</version>
31+
<version>v2.0.1</version>
3232
</dependency>
3333
<dependency>
3434
<groupId>org.springframework.boot</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.6</version>
44+
<version>2.1.7</version>
4545
</dependency>
4646
<dependency>
4747
<groupId>org.springframework.boot</groupId>
@@ -51,17 +51,17 @@
5151
<dependency>
5252
<groupId>com.microsoft.azure.sdk.iot</groupId>
5353
<artifactId>iot-device-client</artifactId>
54-
<version>2.4.0</version>
54+
<version>2.4.1</version>
5555
</dependency>
5656
<dependency>
5757
<groupId>com.microsoft.azure</groupId>
5858
<artifactId>applicationinsights-spring-boot-starter</artifactId>
59-
<version>2.5.1</version>
59+
<version>2.6.4</version>
6060
</dependency>
6161
<dependency>
6262
<groupId>com.microsoft.azure</groupId>
6363
<artifactId>azure-spring-boot-metrics-starter</artifactId>
64-
<version>2.2.1</version>
64+
<version>2.3.5</version>
6565
</dependency>
6666
<dependency>
6767
<groupId>org.springframework.integration</groupId>
@@ -70,12 +70,12 @@
7070
<dependency>
7171
<groupId>org.apache.maven</groupId>
7272
<artifactId>maven-model</artifactId>
73-
<version>3.8.5</version>
73+
<version>3.9.6</version>
7474
</dependency>
7575
<dependency>
7676
<groupId>org.apache.commons</groupId>
7777
<artifactId>commons-text</artifactId>
78-
<version>1.10.0</version>
78+
<version>1.11.0</version>
7979
</dependency>
8080
<dependency>
8181
<groupId>net.jodah</groupId>
@@ -90,13 +90,13 @@
9090
<dependency>
9191
<groupId>com.tngtech.archunit</groupId>
9292
<artifactId>archunit</artifactId>
93-
<version>0.23.1</version>
93+
<version>1.2.1</version>
9494
<scope>test</scope>
9595
</dependency>
9696
<dependency>
9797
<groupId>com.tngtech.archunit</groupId>
9898
<artifactId>archunit-junit5</artifactId>
99-
<version>0.23.1</version>
99+
<version>1.2.1</version>
100100
<scope>test</scope>
101101
</dependency>
102102
</dependencies>

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public TaskScheduler taskScheduler() {
7373
}
7474

7575
@Bean
76-
public void init() {
76+
public Object init() {
7777
RetryPolicy<Void> commandRetryPolicy = restCommandRetryPolicy();
7878
TaskScheduler taskScheduler = taskScheduler();
7979
RetryPolicy<List<Group>> groupRetryPolicy = restGroupRetryPolicy();
@@ -144,6 +144,7 @@ public void init() {
144144
}
145145
});
146146
});
147+
return new Object();
147148
}
148149

149150
private IoTDeviceProvider createIotDeviceProvider(AzureIotHubProperties azureIotHubProperties) {

0 commit comments

Comments
 (0)