rabbitmq操作
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

145 lines
4.4 KiB

3 years ago
3 years ago
  1. package rabbitmq
  2. // --订单--
  3. //订单路由
  4. const ORDER_EXCHANGE string = "ex_order"
  5. //已创建订单route key
  6. const ORDER_CREATED_KEY string = "created"
  7. //订单已创建队列,订单服务用
  8. const ORDER_CREATED_QUEUE = "order_created_queue"
  9. //已创建订单队列,串货服务用
  10. const CHANNEL_ORDER_CREATED_QUEUE = "channel_order_created_queue"
  11. //已支付订单route key
  12. const ORDER_PAYED_KEY string = "payed"
  13. //订单已支付队列,订单服务用
  14. const ORDER_PAYED_QUEUE = "order_payed_queue"
  15. //订单已支付队列,串货服务用
  16. const CHANNEL_ORDER_PAYED_QUEUE = "channel_order_payed_queue"
  17. //订单已支付队列,配送服务用
  18. const DELIVERY_ORDER_PAYED_QUEUE = "delivery_order_payed_queue"
  19. //订单已支付队列,打印服务用
  20. const PRINT_ORDER_PAYED_QUEUE = "print_order_payed_queue"
  21. //订单状态更新route key
  22. const ORDER_STATUS_CHANGE_KEY string = "status_change"
  23. //订单状态更新队列,订单服务用
  24. const ORDER_STATUS_UPDATE_QUEUE = "order_status_update_queue"
  25. //订单状态更新,串货服务用
  26. const CHANNEL_ORDER_STATUS_CHANGE_QUEUE = "channel_order_update_status"
  27. //订单取消route key
  28. const ORDER_CANCELED_KEY string = "canceled"
  29. //订单取消队列,订单服务用
  30. const ORDER_CANCELED_QUEUE = "order_canceled_queue"
  31. //订单取消队列,串货服务用
  32. const CHANNEL_ORDER_CANCELED_QUEUE = "channel_order_canceled_queue"
  33. //订单发货route key
  34. const ORDER_DELIVERED_KEY string = "delivered"
  35. //订单发货队列,订单服务用
  36. const ORDER_DELIVERED_QUEUE = "order_delivered_queue"
  37. //订单发货队列,串货服务用
  38. const CHANNEL_ORDER_DELIVERED_QUEUE = "channel_order_delivered_queue"
  39. //订单收货route key
  40. const ORDER_RECEIVED_KEY string = "received"
  41. //订单取消队列,订单服务用
  42. const ORDER_RECEIVED_QUEUE = "order_received_queue"
  43. //订单取消队列,串货服务用
  44. const CHANNEL_ORDER_RECEIVED_QUEUE = "channel_order_received_queue"
  45. //订单退款route key
  46. const ORDER_REFUNDED_KEY string = "refunded"
  47. //订单退款队列,订单服务用
  48. const ORDER_REFUNDED_QUEUE = "order_refunded_queue"
  49. //订单退款队列,串货服务用
  50. const CHANNEL_ORDER_REFUNDED_QUEUE = "channel_order_refunded_queue"
  51. //订单完成route key
  52. const ORDER_FINISHED_KEY string = "finished"
  53. //订单退款队列,订单服务用
  54. const ORDER_FINISHED_QUEUE = "order_finished_queue"
  55. //订单退款队列,串货服务用
  56. const CHANNEL_ORDER_FINISHED_QUEUE = "channel_order_finished_queue"
  57. //订单等待创建key,订单服务用
  58. const ORDER_ADD_KEY = "add"
  59. //订单等待创建队列,订单服务用
  60. const ORDER_ADD_QUEUE = "order_add_queue"
  61. //订单延迟队列路由
  62. const ORDER_DELAY_EXCHANGE string = "ex_order_delay"
  63. //未支付订单过期自动取消key
  64. const ORDER_AUTO_CANCEL_KEY string = "order_auto_cancel"
  65. //未支付订单过期自动取消队列
  66. const ORDER_AUTO_CANCEL_QUEUE string = "order_auto_cancel_queue"
  67. //未支付订单过期自动取消队列,串货服务用
  68. const CHANNEL_ORDER_AUTO_CANCEL_QUEUE string = "channel_order_auto_cancel_queue"
  69. //订单发货后到期自动收货key
  70. const ORDER_AUTO_RECEIVE_KEY string = "order_auto_received"
  71. //订单发货后到期自动收货队列
  72. const ORDER_AUTO_RECEIVE_QUEUE string = "order_auto_receive_queue"
  73. //订单自动收货队列,串货服务用
  74. const CHANNEL_ORDER_AUTO_RECEIVE_QUEUE string = "channel_order_auto_receive_queue"
  75. //订单申请退款消息key
  76. const ORDER_ASK_FOR_REFUND_KEY string = "order_ask_for_refund"
  77. //订单申请退款消息队列
  78. const ORDER_ASK_FOR_REFUND_QUEUE string = "order_ask_for_refund_queue"
  79. //订单申请退款队列,串货服务用
  80. const CHANNEL_ORDER_ASK_FOR_REFUND_QUEUE string = "channel_order_ask_for_refund_queue"
  81. // --串货--
  82. //串货订单路由
  83. const CHANNEL_ORDER_EXCHANGE string = "ex_channel_order"
  84. //串货订单请求支付route key
  85. const CHANNEL_ORDER_ASKPAY_KEY = "channel_order_askpay"
  86. //订单请求支付队列,串货服务用
  87. const CHANNEL_ORDER_ASKPAY_QUEUE = "channel_order_askpay_queue"
  88. //订单请求支付route key
  89. const ORDER_ASKPAY_KEY = "order_askpay"
  90. //订单请求支付队列,串货服务用
  91. const ORDER_ASKPAY_QUEUE = "order_askpay_queue"
  92. // --通知--
  93. //发送接口请求路由
  94. const SEND_MSG_EXCHANGE string = "ex_send_msg"
  95. //发送接口请求路由route key
  96. const SEND_API_MSG_KEY = "api_send_msg"
  97. //发送接口请求队列,定时服务用
  98. const SEND_MSG_QUEUE = "send_msg_queue"