This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
MQTT subscriber stops consuming messages after some inactivity time #246
Labels
guidance
Question that needs advice or information.
needs-triage
This issue or PR still needs to be triaged.
Describe the issue
I have been running a service which is based on this sdk. This service connects to MQTT broker using certs and AwsIotMqttConnectionBuilder to get the connection object. Lately I am observing that subscriber stops consuming messages from the broker even though there are messages getting published. It happens only when there is an inactivity time gap b/w messages.
I have checked the trace logs of sdk but could not find anything which can give details on this subscriber issue. Only way to solve this is to restart that connection/service.
Below are the details:
```
software.amazon.awssdk.iotdevicesdk
aws-iot-device-sdk
1.6.1
private final Runnable mqttConsumerTask = new Runnable() {
@OverRide
public void run() {
try {
connection.subscribe(Constants.TOPIC, QualityOfService.AT_MOST_ONCE, mqttConsumer);
} catch (Exception e) {
logger.error("Error while subscribing the topic {}", Constants.TOPIC_CMD_RESP);
}
}
};
Current behavior
No response
aws-iot-device-sdk-java-v2 version used
1.6.1
JDK version used
openjdk version "1.8.0_252" OpenJDK Runtime Environment (build 1.8.0_252-b09) OpenJDK 64-Bit Server VM (build 25.252-b09, mixed mode)
Operating System and version
Ubuntu 5.4.0-1024-aws #24-Ubuntu SMP Sat Sep 5 06:19:55 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
The text was updated successfully, but these errors were encountered: