Title: IoT - Exponential backoff algorithm wait time calculation error · Issue #2242 · GoogleCloudPlatform/python-docs-samples · GitHub
Open Graph Title: IoT - Exponential backoff algorithm wait time calculation error · Issue #2242 · GoogleCloudPlatform/python-docs-samples
X Title: IoT - Exponential backoff algorithm wait time calculation error · Issue #2242 · GoogleCloudPlatform/python-docs-samples
Description: In which file did you encounter the issue? python-docs-samples/iot/api-client/mqtt_example/cloudiot_mqtt_example.py Describe the issue Exponential backoff in above mentioned file doesn't follow algorithm described in link. Variable minim...
Open Graph Description: In which file did you encounter the issue? python-docs-samples/iot/api-client/mqtt_example/cloudiot_mqtt_example.py Describe the issue Exponential backoff in above mentioned file doesn't follow alg...
X Description: In which file did you encounter the issue? python-docs-samples/iot/api-client/mqtt_example/cloudiot_mqtt_example.py Describe the issue Exponential backoff in above mentioned file doesn't follow...
Opengraph URL: https://github.com/GoogleCloudPlatform/python-docs-samples/issues/2242
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"IoT - Exponential backoff algorithm wait time calculation error","articleBody":"## In which file did you encounter the issue?\r\n\r\n`python-docs-samples/iot/api-client/mqtt_example/cloudiot_mqtt_example.py`\r\n\r\n## Describe the issue\r\n\r\n[Exponential backoff](https://cloud.google.com/iot/docs/how-tos/exponential-backoff) in above mentioned file doesn't follow algorithm described in link.\r\n\r\nVariable `minimum_backoff_time` is referenced as global in all functions: `listen_for_messages`, `send_data_from_bound_device` and `mqtt_device_demo`. \r\nBut it **does not** get updated outside, which produces wait(delay) 1 to 2 seconds, not 1, 2, 4, 8 and 32 seconds.\r\n\r\n```\r\nDevice client_id is 'projects/example_project_id/locations/europe-west1/registries/example_registry/devices/test_device'\r\nCreating JWT using ES256 from private key file /home/dinko/keys/ec_private.pem\r\nSubscribing to /devices/test_device/commands/#\r\nPublishing message 1/100: 'example_registry/test_device-payload-1'\r\non_connect Connection Refused: not authorised.\r\non_disconnect 5: The connection was refused.\r\nWaiting for 1.173 before reconnecting.\r\nMinimum_backoff_time: 2\r\n\r\nPublishing message 2/100: 'example_registry/test_device-payload-2'\r\non_connect Connection Refused: not authorised.\r\non_disconnect 5: The connection was refused.\r\nWaiting for 1.09 before reconnecting.\r\nMinimum_backoff_time: 2\r\n\r\nPublishing message 3/100: 'example_registry/test_device-payload-3'\r\non_connect Connection Refused: not authorised.\r\non_disconnect 5: The connection was refused.\r\nWaiting for 1.2 before reconnecting.\r\nMinimum_backoff_time: 2\r\n\r\nPublishing message 4/100: 'example_registry/test_device-payload-4'\r\non_connect Connection Refused: not authorised.\r\non_disconnect 5: The connection was refused.\r\nWaiting for 1.6680000000000001 before reconnecting.\r\nMinimum_backoff_time: 2\r\n\r\nPublishing message 5/100: 'example_registry/test_device-payload-5'\r\non_connect Connection Refused: not authorised.\r\non_disconnect 5: The connection was refused.\r\nWaiting for 1.7269999999999999 before reconnecting.\r\nMinimum_backoff_time: 2\r\n\r\nPublishing message 6/100: 'example_registry/test_device-payload-6'\r\non_connect Connection Refused: not authorised.\r\non_disconnect 5: The connection was refused.\r\nWaiting for 1.289 before reconnecting.\r\nMinimum_backoff_time: 2\r\n\r\nPublishing message 7/100: 'example_registry/test_device-payload-7'\r\non_connect Connection Refused: not authorised.\r\non_disconnect 5: The connection was refused.\r\nWaiting for 1.194 before reconnecting.\r\nMinimum_backoff_time: 2\r\n```\r\nVersion: **Python 3.6.7**","author":{"url":"https://github.com/dinkopehar","@type":"Person","name":"dinkopehar"},"datePublished":"2019-06-26T13:52:36Z","url":"https://github.com/GoogleCloudPlatform/python-docs-samples/issues/2242"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:d5bb479a-0a2a-a8e5-57c7-e74c345fe75f |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 90FC:127D41:890DCA:C0B999:6AFE1A4F |
| html-safe-nonce | ecdc91bfe2695f86f8385b6d509308226e8d7bf6088e2e4e1362f5127451a462 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MEZDOjEyN0Q0MTo4OTBEQ0E6QzBCOTk5OjZBRkUxQTRGIiwidmlzaXRvcl9pZCI6IjQ1NjYwOTA0MDI1OTQ5NTM4MDciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 4ddf6350256bddd90d8d97375074d87f0020f62128a160d6c5ebb3fd68a4cd3a |
| hovercard-subject-tag | issue:460984738 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/GoogleCloudPlatform/python-docs-samples/2242/issue_layout |
| twitter:image | https://opengraph.githubassets.com/aad52b16aee874a10bc14f8bce941d07e70670907b8d4bd43b4f2b55ebe3c4c7/GoogleCloudPlatform/python-docs-samples/issues/2242 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/aad52b16aee874a10bc14f8bce941d07e70670907b8d4bd43b4f2b55ebe3c4c7/GoogleCloudPlatform/python-docs-samples/issues/2242 |
| og:image:alt | In which file did you encounter the issue? python-docs-samples/iot/api-client/mqtt_example/cloudiot_mqtt_example.py Describe the issue Exponential backoff in above mentioned file doesn't follow alg... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | dinkopehar |
| hostname | github.com |
| expected-hostname | github.com |
| None | d0525ab1464526bf4532a5551aa348cf100dff75ef808a96fc67a08b1d946aa9 |
| turbo-cache-control | no-preview |
| go-import | github.com/GoogleCloudPlatform/python-docs-samples git https://github.com/GoogleCloudPlatform/python-docs-samples.git |
| octolytics-dimension-user_id | 2810941 |
| octolytics-dimension-user_login | GoogleCloudPlatform |
| octolytics-dimension-repository_id | 35065876 |
| octolytics-dimension-repository_nwo | GoogleCloudPlatform/python-docs-samples |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 35065876 |
| octolytics-dimension-repository_network_root_nwo | GoogleCloudPlatform/python-docs-samples |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | fef3993a71fa20f7be8e167132fbf9619bc66e12 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width