golang 的 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.
 
 
 

118 lines
4.1 KiB

  1. package md
  2. type MqQueue struct {
  3. ExchangeName string `json:"exchangeName"` //交换机名字
  4. Name string `json:"name"` //队列名字
  5. Type string `json:"type"` //队列类型
  6. IsPersistent bool `json:"is_persistent"` //队列是否持久化
  7. RoutKey string `json:"rout_key"` //路由
  8. BindKey string `json:"bind_key"` //绑定的路由
  9. ConsumeFunName string `json:"consume_fun_name"` //消费方法
  10. }
  11. var RabbitMqQueueKeyList = []*MqQueue{
  12. {
  13. ExchangeName: "zhios.order_track_update.exchange",
  14. Name: "order_track_update_for_tb",
  15. Type: DirectQueueType,
  16. IsPersistent: false,
  17. RoutKey: "tb",
  18. BindKey: "",
  19. ConsumeFunName: "ZhiosOrderTrackUpdateForTbConsume",
  20. },
  21. {
  22. ExchangeName: "zhios.order_track_update.exchange",
  23. Name: "order_track_update_for_jd",
  24. Type: DirectQueueType,
  25. IsPersistent: false,
  26. RoutKey: "jd",
  27. BindKey: "",
  28. ConsumeFunName: "ZhiosOrderTrackUpdateForJdConsume",
  29. },
  30. {
  31. ExchangeName: "zhios.order_track_create.exchange",
  32. Name: "order_track_create_for_tb",
  33. Type: DirectQueueType,
  34. IsPersistent: false,
  35. RoutKey: "tb",
  36. BindKey: "",
  37. ConsumeFunName: "ZhiosOrderTrackCreateForTbConsume",
  38. },
  39. {
  40. ExchangeName: "zhios.order_track_create.exchange",
  41. Name: "order_track_create_for_jd",
  42. Type: DirectQueueType,
  43. IsPersistent: false,
  44. RoutKey: "jd",
  45. BindKey: "",
  46. ConsumeFunName: "ZhiosOrderTrackCreateForJdConsume",
  47. },
  48. {
  49. ExchangeName: "zhios.order_track_create.exchange",
  50. Name: "order_track_create_for_pdd",
  51. Type: DirectQueueType,
  52. IsPersistent: false,
  53. RoutKey: "pdd",
  54. BindKey: "",
  55. ConsumeFunName: "ZhiosOrderTrackCreateForPddConsume",
  56. },
  57. {
  58. ExchangeName: "zhios.order_track_create.exchange",
  59. Name: "order_track_create_for_pdd_zero",
  60. Type: DirectQueueType,
  61. IsPersistent: false,
  62. RoutKey: "pdd_zero",
  63. BindKey: "",
  64. ConsumeFunName: "ZhiosOrderTrackCreateForPddZeroConsume",
  65. },
  66. {
  67. ExchangeName: "zhios.order_track_create.exchange",
  68. Name: "order_track_create_for_wph",
  69. Type: DirectQueueType,
  70. IsPersistent: false,
  71. RoutKey: "vip",
  72. BindKey: "",
  73. ConsumeFunName: "ZhiosOrderTrackCreateForWphConsume",
  74. },
  75. {
  76. ExchangeName: "zhios.order_track_create.exchange",
  77. Name: "order_track_create_for_tik_tok_team",
  78. Type: DirectQueueType,
  79. IsPersistent: false,
  80. RoutKey: "tik_tok_team",
  81. BindKey: "",
  82. ConsumeFunName: "ZhiosOrderTrackCreateForTikTokTeamConsume",
  83. },
  84. {
  85. ExchangeName: "zhios.order_track_refund.exchange",
  86. Name: "order_track_refund_for_tb_all",
  87. Type: DirectQueueType,
  88. IsPersistent: false,
  89. RoutKey: "tb_for_all",
  90. BindKey: "",
  91. ConsumeFunName: "ZhiosOrderTrackRefundForTbAllConsume",
  92. },
  93. {
  94. ExchangeName: "zhios.order_track_refund.exchange",
  95. Name: "order_track_refund_for_tb_part",
  96. Type: DirectQueueType,
  97. IsPersistent: false,
  98. RoutKey: "tb_for_part",
  99. BindKey: "",
  100. ConsumeFunName: "ZhiosOrderTrackRefundForTbPartConsume",
  101. },
  102. }
  103. const (
  104. ZhiosOrderTrackUpdateForTbConsumeFunName = "ZhiosOrderTrackUpdateForTbConsume"
  105. ZhiosOrderTrackCreateForTbConsumeFunName = "ZhiosOrderTrackCreateForTbConsume"
  106. ZhiosOrderTrackCreateForJdConsumeFunName = "ZhiosOrderTrackCreateForJdConsume"
  107. ZhiosOrderTrackCreateForPddConsumeFunName = "ZhiosOrderTrackCreateForPddConsume"
  108. ZhiosOrderTrackCreateForPddZeroConsumeFunName = "ZhiosOrderTrackCreateForPddZeroConsume"
  109. ZhiosOrderTrackCreateForWphConsumeFunName = "ZhiosOrderTrackCreateForWphConsume"
  110. ZhiosOrderTrackCreateForTikTokTeamConsumeFunName = "ZhiosOrderTrackCreateForTikTokTeamConsume"
  111. ZhiosOrderTrackUpdateForJdConsumeFunName = "ZhiosOrderTrackUpdateForJdConsume"
  112. ZhiosOrderTrackRefundForTbAllConsumeFunName = "ZhiosOrderTrackRefundForTbAllConsume"
  113. ZhiosOrderTrackRefundForTbPartConsumeFunName = "ZhiosOrderTrackRefundForTbPartConsume"
  114. )