Skip to content

Commit

Permalink
update CRT and expose timeout for request (#145)
Browse files Browse the repository at this point in the history
  • Loading branch information
TingDaoK authored Mar 16, 2021
1 parent ab2d56d commit 8d4205f
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 6 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ mvn clean install
``` sh
# NOTE: use the latest version of the CRT here

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

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

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

Expand Down
2 changes: 1 addition & 1 deletion android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ repositories {
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation project(":iotdevicesdk")
implementation 'software.amazon.awssdk.crt:android:0.10.10'
implementation 'software.amazon.awssdk.crt:android:0.11.2'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.core:core:1.2.0'
Expand Down
2 changes: 1 addition & 1 deletion android/iotdevicesdk/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ repositories {

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'software.amazon.awssdk.crt:android:0.10.10'
implementation 'software.amazon.awssdk.crt:android:0.11.2'
implementation 'com.google.code.gson:gson:2.8.5'
implementation 'androidx.appcompat:appcompat:1.1.0'
testImplementation 'junit:junit:4.12'
Expand Down
2 changes: 1 addition & 1 deletion sdk/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
<dependency>
<groupId>software.amazon.awssdk.crt</groupId>
<artifactId>aws-crt</artifactId>
<version>0.10.10</version>
<version>0.11.2</version>
</dependency>
<dependency>
<groupId>junit</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,18 @@ public AwsIotMqttConnectionBuilder withPingTimeoutMs(int pingTimeoutMs) {
return this;
}

/**
* Controls timeout value for requests that response is required on healthy connection.
* If a response is not received within this interval, the request will fail as server not receiving it.
* Applied to publish (QoS>0) and unsubscribe
*
* @param protocolOperationTimeoutMs How long to wait for a request response (in milliseconds) before failing
*/
public AwsIotMqttConnectionBuilder withProtocolOperationTimeoutMs(int protocolOperationTimeoutMs) {
this.config.setProtocolOperationTimeoutMs(protocolOperationTimeoutMs);
return this;
}

/**
* Configures the TCP socket connect timeout (in milliseconds)
*
Expand Down

0 comments on commit 8d4205f

Please sign in to comment.