MQTT subscriber stops consuming messages after some inactivity time #250
agupta0105
started this conversation in
General
Replies: 1 comment
-
As it stands this is too vague to be very actionable. My suggestion would be to use wireshark or a similar tool to verify that the client/connection is actually receiving packets. Even better would be to verify/repro against a local mosquitto install where you could use a plaintext connection and see the packet internals. If you can repro under such circumstances and verify that you are receiving the packets but not getting callbacks, then please also include the trace logs and packet timings. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
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
Beta Was this translation helpful? Give feedback.
All reactions