Skip to content

Conversation

@glin93
Copy link
Contributor

@glin93 glin93 commented Dec 9, 2025

… specific message types

Refactor rabbitmq_publish_message to correctly handle exchange and routing key determination based on the presence of MEMSCHEDULER_RABBITMQ_EXCHANGE_NAME environment variable and the message label.

  • Default exchange and routing key are used for most messages.
  • 'knowledgeBaseUpdate' messages always have an empty routing key.
  • If MEMSCHEDULER_RABBITMQ_EXCHANGE_NAME is set, and the message label is 'taskStatus' or 'knowledgeBaseUpdate', the exchange is overridden with the environment variable's value, and the routing key is set to empty. This fixes the 'taskStatus' routing issue in cloud environments.
  • Logging for cloud-affected messages is now specific and separate from local 'knowledgeBaseUpdate' logging.

Description

Summary: (summary)

Fix: #(issue)

Docs Issue/PR: (docs-issue-or-pr-link)

Reviewer: @(reviewer)

Checklist:

  • I have performed a self-review of my own code | 我已自行检查了自己的代码
  • I have commented my code in hard-to-understand areas | 我已在难以理解的地方对代码进行了注释
  • I have added tests that prove my fix is effective or that my feature works | 我已添加测试以证明我的修复有效或功能正常
  • I have created related documentation issue/PR in MemOS-Docs (if applicable) | 我已在 MemOS-Docs 中创建了相关的文档 issue/PR(如果适用)
  • I have linked the issue to this PR (if applicable) | 我已将 issue 链接到此 PR(如果适用)
  • I have mentioned the person who will review this PR | 我已提及将审查此 PR 的人

… specific message types

Refactor rabbitmq_publish_message to correctly handle exchange and routing key
determination based on the presence of MEMSCHEDULER_RABBITMQ_EXCHANGE_NAME
environment variable and the message label.

- Default exchange and routing key are used for most messages.
- 'knowledgeBaseUpdate' messages always have an empty routing key.
- If MEMSCHEDULER_RABBITMQ_EXCHANGE_NAME is set, and the message label is
  'taskStatus' or 'knowledgeBaseUpdate', the exchange is overridden with
  the environment variable's value, and the routing key is set to empty.
  This fixes the 'taskStatus' routing issue in cloud environments.
- Logging for cloud-affected messages is now specific and separate from local
  'knowledgeBaseUpdate' logging.
@glin93 glin93 merged commit 485c44e into dev Dec 9, 2025
16 checks passed
@glin93 glin93 deleted the fix/rabbitmq-task-status-routing branch December 9, 2025 08:50
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.

3 participants