Reputation: 3430
How can I set the number of auto-reconnect attempts and retry limits of the AWSIoTManager?
here's the java example:
aWSIotMqttManager = AWSIotMqttManager(..)
aWSIotMqttManager.maxAutoReconnectAttempts = 1
aWSIotMqttManager.setReconnectRetryLimits(1, 4)
Upvotes: 0
Views: 383
Reputation: 8484
On the aws-sdk-ios
you can provide each service with a configuration on registration (as shown with AWSIoTManager)
AWSServiceConfiguration
inherits from AWSNetworkingConfiguration
, which in has the property maxRetryCount
:
The maximum number of retries for failed requests. The value needs to be between 0 and 10 inclusive. If set to higher than 10, it becomes 10.
For example (swift):
let configuration = AWSServiceConfiguration(maxRetryCount: 7)
AWSIoTManager.register(with: configuration!, forKey: "USWest2IoTManager")
Upvotes: 1