Commit 485c44e
authored
Fix(rabbitmq): Handle exchange and routing key based on cloud env for… (#667)
Fix(rabbitmq): Handle exchange and routing key based on cloud env for 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.
Co-authored-by: [email protected] <>1 parent 5f7505f commit 485c44e
File tree
1 file changed
+18
-8
lines changed- src/memos/mem_scheduler/webservice_modules
1 file changed
+18
-8
lines changedLines changed: 18 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
283 | 283 | | |
284 | 284 | | |
285 | 285 | | |
| 286 | + | |
286 | 287 | | |
287 | | - | |
288 | | - | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
289 | 291 | | |
290 | | - | |
291 | | - | |
292 | | - | |
293 | | - | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
294 | 297 | | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
295 | 306 | | |
296 | | - | |
297 | | - | |
| 307 | + | |
298 | 308 | | |
299 | 309 | | |
300 | 310 | | |
| |||
0 commit comments