Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions mango/container/mqtt.py
Original file line number Diff line number Diff line change
Expand Up @@ -322,15 +322,7 @@ async def _handle_message(self, *, priority: int, content, meta: dict[str, Any])
topic = meta["topic"]
logger.debug("Received message with content and meta;%s;%s", content, meta)
if topic == self.inbox_topic:
# General inbox topic, so no receiver is specified by the topic
# try to find the receiver from meta
receiver_id = meta.get("receiver_id", None)
if receiver_id and receiver_id in self._agents.keys():
receiver = self._agents[receiver_id]
await receiver.inbox.put((priority, content, meta))
else:
# receiver might exist in mirrored container
logger.debug("Receiver ID is unknown;%s", receiver_id)
await super()._handle_message(priority=priority, content=content, meta=meta)
else:
# no inbox topic. Check who has subscribed the topic.
receivers = set()
Expand Down
10 changes: 0 additions & 10 deletions mango/container/tcp.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,16 +295,6 @@ async def _send_external_message(self, addr, message, meta) -> bool:
def _create_mirror_container(self):
return tcp_mirror_container_creator

def as_agent_process(
self,
agent_creator,
mirror_container_creator=tcp_mirror_container_creator,
):
return super().as_agent_process(
agent_creator=agent_creator,
mirror_container_creator=mirror_container_creator,
)

async def shutdown(self):
"""
calls shutdown() from super class Container and closes the server
Expand Down