TTL for Max Inflight Message queue in V1 SDK and V2 SDK #332
-
Team, |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
Hi @mogambo100, You can set a timeout for operations in the Java V1 and V2 SDKs to avoid the issue where the server is down and therefore operations just sit in the queue. For Java V1, you can do something like the following on a per operation basis:
All operations can have a timeout associated with them, as described in the Java V1 Readme. This will prevent the operations from just sitting in the queue endless waiting. For Java V2, a timeout can be applied on a per-operation basis using the following:
You can also set an operation timeout for all operations in the MqttConnection through the withProtocolOperationTimeoutMs function:
Either way will add a timeout and prevent operations from just sitting endlessly waiting. |
Beta Was this translation helpful? Give feedback.
-
Thanks @TwistedTwigleg . For V1 SDK i got the point. For V2 SDK i wanted to know one thing, Q2. Lets say we add both the things and both set at same value of 5000ms. Will that create an issue |
Beta Was this translation helpful? Give feedback.
-
Hello! Reopening this discussion to make it searchable. |
Beta Was this translation helpful? Give feedback.
Hi @mogambo100,
You can set a timeout for operations in the Java V1 and V2 SDKs to avoid the issue where the server is down and therefore operations just sit in the queue.
For Java V1, you can do something like the following on a per operation basis:
All operations can have a timeout associated with them, as described in the Java V1 Readme. This will prevent the operations from just sitting in the queue endless waiting.
For Java V2, a timeout can be applied on a per-operation basis using the following: