Skip to content

mqtt: resubscribe inbox topic on reconnect#169

Merged
rcschrg merged 2 commits intodevelopmentfrom
mqtt_reconnect
Apr 17, 2025
Merged

mqtt: resubscribe inbox topic on reconnect#169
rcschrg merged 2 commits intodevelopmentfrom
mqtt_reconnect

Conversation

@maurerle
Copy link
Collaborator

@maurerle maurerle commented Apr 10, 2025

unify call to _send_external_message by making it async as the other containers

catch RuntimeError when send_external_message fails - this does not resubmit the message to the broker yet

related to #97

This does not yet fix all issues when the broker goes down, as messages are lost and not sent again.
Would be good to handle this in the agent framework and not in the simulation itself.

unify call to _send_external_message by making it asnyc as the other containers do
catch RuntimeError when send_external_message fails - this does not resubmit the message to the broker yet
@codecov
Copy link

codecov bot commented Apr 10, 2025

Codecov Report

Attention: Patch coverage is 60.00000% with 6 lines in your changes missing coverage. Please review.

Project coverage is 88.99%. Comparing base (f14d832) to head (af8228f).
Report is 3 commits behind head on development.

Files with missing lines Patch % Lines
mango/container/mqtt.py 60.00% 6 Missing ⚠️
Additional details and impacted files
@@               Coverage Diff               @@
##           development     #169      +/-   ##
===============================================
- Coverage        89.15%   88.99%   -0.16%     
===============================================
  Files               22       22              
  Lines             2507     2516       +9     
===============================================
+ Hits              2235     2239       +4     
- Misses             272      277       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@maurerle maurerle marked this pull request as ready for review April 14, 2025 21:57
@maurerle
Copy link
Collaborator Author

Lost messages and not sending again could be handled in the AgentContext.send_message, that way would also be beneficial for tcp with packet loss.

For now, I'd like to add this change as is, as it fixes the access to an unitialized self.inbox at the start of a container

@maurerle maurerle requested a review from rcschrg April 17, 2025 10:44
@rcschrg rcschrg merged commit 4fab222 into development Apr 17, 2025
8 of 10 checks passed
@maurerle maurerle deleted the mqtt_reconnect branch April 17, 2025 13:59
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.

2 participants