Skip to content

Commit 8d4205f

Browse files
authored
update CRT and expose timeout for request (#145)
1 parent ab2d56d commit 8d4205f

File tree

5 files changed

+18
-6
lines changed

5 files changed

+18
-6
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ mvn clean install
5050
``` sh
5151
# NOTE: use the latest version of the CRT here
5252

53-
git clone --branch v0.10.10 https://github.com/awslabs/aws-crt-java.git
53+
git clone --branch v0.11.2 https://github.com/awslabs/aws-crt-java.git
5454

5555
git clone https://github.com/awslabs/aws-iot-device-sdk-java-v2.git
5656
cd aws-crt-java
@@ -65,7 +65,7 @@ Supports API 26 or newer.
6565
NOTE: The shadow sample does not currently complete on android due to its dependence on stdin keyboard input.
6666

6767
``` sh
68-
git clone --recursive --branch v0.10.10 https://github.com/awslabs/aws-crt-java.git
68+
git clone --recursive --branch v0.11.2 https://github.com/awslabs/aws-crt-java.git
6969
git clone https://github.com/awslabs/aws-iot-device-sdk-java-v2.git
7070
cd aws-crt-java/android
7171
./gradlew connectedCheck # optional, will run the unit tests on any connected devices/emulators
@@ -86,7 +86,7 @@ repositories {
8686
}
8787
8888
dependencies {
89-
implementation 'software.amazon.awssdk.crt:android:0.10.10'
89+
implementation 'software.amazon.awssdk.crt:android:0.11.2'
9090
}
9191
```
9292

android/app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ repositories {
5050
dependencies {
5151
implementation fileTree(dir: 'libs', include: ['*.jar'])
5252
implementation project(":iotdevicesdk")
53-
implementation 'software.amazon.awssdk.crt:android:0.10.10'
53+
implementation 'software.amazon.awssdk.crt:android:0.11.2'
5454
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
5555
implementation 'androidx.appcompat:appcompat:1.1.0'
5656
implementation 'androidx.core:core:1.2.0'

android/iotdevicesdk/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ repositories {
8787

8888
dependencies {
8989
implementation fileTree(dir: 'libs', include: ['*.jar'])
90-
implementation 'software.amazon.awssdk.crt:android:0.10.10'
90+
implementation 'software.amazon.awssdk.crt:android:0.11.2'
9191
implementation 'com.google.code.gson:gson:2.8.5'
9292
implementation 'androidx.appcompat:appcompat:1.1.0'
9393
testImplementation 'junit:junit:4.12'

sdk/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
<dependency>
4343
<groupId>software.amazon.awssdk.crt</groupId>
4444
<artifactId>aws-crt</artifactId>
45-
<version>0.10.10</version>
45+
<version>0.11.2</version>
4646
</dependency>
4747
<dependency>
4848
<groupId>junit</groupId>

sdk/src/main/java/software/amazon/awssdk/iot/AwsIotMqttConnectionBuilder.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,18 @@ public AwsIotMqttConnectionBuilder withPingTimeoutMs(int pingTimeoutMs) {
228228
return this;
229229
}
230230

231+
/**
232+
* Controls timeout value for requests that response is required on healthy connection.
233+
* If a response is not received within this interval, the request will fail as server not receiving it.
234+
* Applied to publish (QoS>0) and unsubscribe
235+
*
236+
* @param protocolOperationTimeoutMs How long to wait for a request response (in milliseconds) before failing
237+
*/
238+
public AwsIotMqttConnectionBuilder withProtocolOperationTimeoutMs(int protocolOperationTimeoutMs) {
239+
this.config.setProtocolOperationTimeoutMs(protocolOperationTimeoutMs);
240+
return this;
241+
}
242+
231243
/**
232244
* Configures the TCP socket connect timeout (in milliseconds)
233245
*

0 commit comments

Comments
 (0)