OFFIS-DAI / mango

Modular Python-based agent framework to implement multi-agent systems
https://mango-agents.readthedocs.io/
MIT License
12 stars 2 forks source link

Fix mqtt #130

Closed maurerle closed 1 week ago

maurerle commented 1 week ago

Added Agents ended up having ("localhost", 1883) as self.context.addr, which is not a valid topic - though self.context.addr is used as the topic in the mqtt container.

This is weird, as it sends messages always externally, even if they come from an internal agent (as the internal agent has ("localhost", 1883) as address while self.inbox_topic is something different).

Furthermore the inbox topic is currently optional, yet it does not work without specifying one. It would be great to have the easier usage by using the client_id if no input_topic is given (as it was before I think?).

This PR also adds a test which fails without the given fix, due to the above described issue.

codecov[bot] commented 1 week ago

Codecov Report

Attention: Patch coverage is 64.28571% with 5 lines in your changes missing coverage. Please review.

Project coverage is 88.65%. Comparing base (5a557d9) to head (98bc958). Report is 8 commits behind head on development.

Files with missing lines Patch % Lines
mango/container/mqtt.py 64.28% 5 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## development #130 +/- ## =============================================== + Coverage 88.56% 88.65% +0.09% =============================================== Files 22 22 Lines 2404 2407 +3 =============================================== + Hits 2129 2134 +5 + Misses 275 273 -2 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.