Skip to content

Fix Throttling Message Parsing #50

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 13, 2020

Conversation

brentru
Copy link
Member

@brentru brentru commented Nov 13, 2020

Messages on throttling topics now raise AdafruitIO_ThrottleError.

Fixes: #49

Tested on Adafruit CircuitPython 6.0.0-rc.2 on 2020-11-12; Adafruit Metro M4 Airlift Lite with samd51j19

Example Output:

Subscribed to brubell/throttle with QOS level 0
Publishing a new message every 10 seconds...
Publishing 26 to DemoFeed.
Publishing 38 to DemoFeed.
Publishing 25 to DemoFeed.
Publishing 67 to DemoFeed.
Publishing 79 to DemoFeed.
Publishing 92 to DemoFeed.
Publishing 22 to DemoFeed.
Publishing 2 to DemoFeed.
Publishing 33 to DemoFeed.
Publishing 45 to DemoFeed.
Publishing 92 to DemoFeed.
Publishing 64 to DemoFeed.
Publishing 15 to DemoFeed.
Traceback (most recent call last):
  File "code.py", line 128, in <module>
  File "/lib/adafruit_io/adafruit_io.py", line 246, in loop
  File "adafruit_minimqtt/adafruit_minimqtt.py", line 706, in loop
  File "adafruit_minimqtt/adafruit_minimqtt.py", line 733, in _wait_for_msg
  File "adafruit_minimqtt/adafruit_minimqtt.py", line 273, in _handle_on_message
  File "/lib/adafruit_io/adafruit_io.py", line 178, in _on_message_mqtt
AdafruitIO_ThrottleError: "brubell data rate limit reached, 1 seconds until throttle released"```

@brentru brentru requested a review from a team November 13, 2020 21:09
@brentru brentru merged commit bf20b69 into adafruit:master Nov 13, 2020
adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Nov 14, 2020
Updating https://github.com/adafruit/Adafruit_CircuitPython_IL0373 to 1.3.2 from 1.3.1:
  > Merge pull request adafruit/Adafruit_CircuitPython_IL0373#14 from tannewt/tune_grayscale

Updating https://github.com/adafruit/Adafruit_CircuitPython_LIS3MDL to 1.1.6 from 1.1.5:
  > Merge pull request adafruit/Adafruit_CircuitPython_LIS3MDL#14 from Breefield/patch-1

Updating https://github.com/adafruit/Adafruit_CircuitPython_MONSTERM4SK to 0.1.1 from 0.1.0:
  > Merge pull request adafruit/Adafruit_CircuitPython_MONSTERM4SK#5 from FoamyGuy/fix_refrences_to_old_repo_name

Updating https://github.com/adafruit/Adafruit_CircuitPython_AdafruitIO to 4.3.0 from 4.2.2:
  > Merge pull request adafruit/Adafruit_CircuitPython_AdafruitIO#50 from brentru/fix-throttling-message-parsing

Updating https://github.com/adafruit/Adafruit_CircuitPython_MagTag to 1.0.1 from 1.0.0:
  > Merge pull request adafruit/Adafruit_CircuitPython_MagTag#2 from ladyada/main

Updating https://github.com/adafruit/Adafruit_CircuitPython_MatrixPortal to 1.9.4 from 1.9.3:
  > Merge pull request adafruit/Adafruit_CircuitPython_MatrixPortal#50 from makermelissa/master

Updating https://github.com/adafruit/Adafruit_CircuitPython_Requests to 1.8.0 from 1.7.5:
  > Merge pull request adafruit/Adafruit_CircuitPython_Requests#46 from adafruit/jepler-patch-1

Updating https://github.com/adafruit/Adafruit_CircuitPython_Slideshow to 1.3.1 from 1.3.0:
  > Merge pull request adafruit/Adafruit_CircuitPython_Slideshow#24 from FoamyGuy/alignment_example

Updating https://github.com/adafruit/Adafruit_CircuitPython_Bundle/circuitpython_library_list.md to NA from NA:
  > Added the following libraries: Adafruit_CircuitPython_MagTag
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Throttling messages throw error
2 participants