Files
JayuCloud/docs/scripts/Salon Core接入MessageHub标准MQ说明_20260906.md
T

20 lines
1.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Salon Core 接入 MessageHub 标准 MQ
## 运行时配置
在 Nacos 对应命名空间的 `core.yaml` 中配置以下非敏感项,在 `secret.yaml` 中配置访问 Token:
```text
MESSAGEHUB_BASE_URL=http://<MessageHub地址>:8080
messagehub.client.access-token=<人工填入 Nacos secret.yaml>
MESSAGEHUB_INGRESS_EXCHANGE=messagehub.ingress.exchange
MESSAGEHUB_INGRESS_ROUTING_KEY=message.send
MESSAGEHUB_SOURCE_SYSTEM=jayucloud-salon
```
SIT 的 `core.yaml` 提供非敏感的 `messagehub.client.*` 连接参数,敏感的 `messagehub.client.access-token` 放在同一命名空间的 `secret.yaml` 中,由 Nacos 在运行时提供。SIT 发布工作流不再读取 Gitea Actions Secret,也不再写入 Core 专用的 systemd 环境文件。Token 由维护人员人工填入 Nacos 配置源后随配置发布。短信发送流程先调用 `/api/v1/messages/ids` 预留消息 ID,再向 RabbitMQ ingress 交换机投递,并在 AMQP Header 中携带 `X-MessageHub-Access-Token`。
## 验证
验证时检查 Core 日志中仅出现场景、手机号、交换机和模板编码,不得输出 Token;再通过 MessageHub 状态接口确认消息进入 `ACCEPTED` 或后续成功状态。