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.
 
 
 

139 lines
4.8 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: "canal.topic",
  14. Name: "canal_order",
  15. Type: TopicQueueType,
  16. IsPersistent: false,
  17. RoutKey: "canal_mall_order",
  18. BindKey: "",
  19. ConsumeFunName: "CanalOrderConsume",
  20. },
  21. {
  22. ExchangeName: "canal.topic",
  23. Name: "canal_guide_order",
  24. Type: TopicQueueType,
  25. IsPersistent: false,
  26. RoutKey: "canal_order_list",
  27. BindKey: "",
  28. ConsumeFunName: "CanalGuideOrderConsume",
  29. },
  30. {
  31. ExchangeName: "zhios.app.user.visit.ip.address.exchange",
  32. Name: "zhios_user_visit_ip_address_queue",
  33. Type: FanOutQueueType,
  34. IsPersistent: false,
  35. RoutKey: "queue_one",
  36. BindKey: "",
  37. ConsumeFunName: "ZhiOsUserVisitIpAddressConsume",
  38. },
  39. {
  40. ExchangeName: "zhios.order.fast.return.exchange",
  41. Name: "zhios_fast_return_order_pay",
  42. Type: DirectQueueType,
  43. IsPersistent: false,
  44. RoutKey: "order_pay",
  45. BindKey: "",
  46. ConsumeFunName: "ZhiosFastReturnOrderPay",
  47. },
  48. {
  49. ExchangeName: "zhios.order.fast.return.exchange",
  50. Name: "zhios_fast_return_order_success",
  51. Type: DirectQueueType,
  52. IsPersistent: false,
  53. RoutKey: "order_success",
  54. BindKey: "",
  55. ConsumeFunName: "ZhiosFastReturnOrderSuccess",
  56. },
  57. {
  58. ExchangeName: "zhios.order.fast.return.exchange",
  59. Name: "zhios_fast_return_order_refund",
  60. Type: DirectQueueType,
  61. IsPersistent: false,
  62. RoutKey: "order_refund",
  63. BindKey: "",
  64. ConsumeFunName: "ZhiosFastReturnOrderRefund",
  65. },
  66. {
  67. ExchangeName: "zhios.doushen.user.register.exchange",
  68. Name: "zhios_doushen_user_register_my_fans",
  69. Type: DirectQueueType,
  70. IsPersistent: false,
  71. RoutKey: "my_fans",
  72. BindKey: "my_fans",
  73. ConsumeFunName: "DouShenUserRegisterConsumeForMyFans",
  74. },
  75. {
  76. ExchangeName: "zhios.doushen.user.register.exchange",
  77. Name: "zhios_doushen_user_register_operation_center",
  78. Type: DirectQueueType,
  79. IsPersistent: false,
  80. RoutKey: "operation_center",
  81. BindKey: "operation_center",
  82. ConsumeFunName: "DouShenUserRegisterConsumeForOperationCenter",
  83. },
  84. {
  85. ExchangeName: "zhios.doushen.user.register.exchange",
  86. Name: "zhios_doushen_user_register_my_recommender",
  87. Type: DirectQueueType,
  88. IsPersistent: false,
  89. RoutKey: "my_recommender",
  90. BindKey: "my_recommender",
  91. ConsumeFunName: "DouShenUserRegisterConsumeForMyRecommender",
  92. },
  93. {
  94. ExchangeName: "zhios.doushen.user.register.exchange",
  95. Name: "zhios_doushen_user_register_official",
  96. Type: DirectQueueType,
  97. IsPersistent: false,
  98. RoutKey: "official",
  99. BindKey: "official",
  100. ConsumeFunName: "DouShenUserRegisterConsumeForOfficial",
  101. },
  102. {
  103. ExchangeName: "canal.topic",
  104. Name: "canal_mall_ord_for_you_mi_shang",
  105. Type: DirectQueueType,
  106. IsPersistent: false,
  107. RoutKey: "canal_mall_order",
  108. BindKey: "",
  109. ConsumeFunName: "CanalMallOrdForYouMiShang",
  110. },
  111. {
  112. ExchangeName: "zhios.youmishang.exchange",
  113. Name: "zhios_youmishang_exchange_store",
  114. Type: DirectQueueType,
  115. IsPersistent: false,
  116. RoutKey: "store",
  117. BindKey: "store",
  118. ConsumeFunName: "YoumishangExchangeStore",
  119. },
  120. }
  121. const (
  122. CanalOrderConsumeFunName = "CanalOrderConsume"
  123. CanalGuideOrderConsumeFunName = "CanalGuideOrderConsume"
  124. ZhiOsUserVisitIpAddressConsumeFunName = "ZhiOsUserVisitIpAddressConsume"
  125. DouShenUserRegisterConsumeForOfficialFunName = "DouShenUserRegisterConsumeForOfficial"
  126. DouShenUserRegisterConsumeForOperationCenterFunName = "DouShenUserRegisterConsumeForOperationCenter"
  127. DouShenUserRegisterConsumeForMyRecommenderFunName = "DouShenUserRegisterConsumeForMyRecommender"
  128. DouShenUserRegisterConsumeForMyFansFunName = "DouShenUserRegisterConsumeForMyFans"
  129. ZhiosFastReturnOrderPayFunName = "ZhiosFastReturnOrderPay"
  130. ZhiosFastReturnOrderSuccessFunName = "ZhiosFastReturnOrderSuccess"
  131. ZhiosFastReturnOrderRefundFunName = "ZhiosFastReturnOrderRefund"
  132. CanalMallOrdForYouMiShangFunName = "CanalMallOrdForYouMiShang"
  133. YoumishangExchangeStoreFunName = "YoumishangExchangeStore"
  134. )