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.
 
 
 

88 lines
3.0 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_refund.exchange",
  59. Name: "order_track_refund_for_tb_all",
  60. Type: DirectQueueType,
  61. IsPersistent: false,
  62. RoutKey: "tb_for_all",
  63. BindKey: "",
  64. ConsumeFunName: "ZhiosOrderTrackRefundForTbAllConsume",
  65. },
  66. {
  67. ExchangeName: "zhios.order_track_refund.exchange",
  68. Name: "order_track_refund_for_tb_part",
  69. Type: DirectQueueType,
  70. IsPersistent: false,
  71. RoutKey: "tb_for_part",
  72. BindKey: "",
  73. ConsumeFunName: "ZhiosOrderTrackRefundForTbPartConsume",
  74. },
  75. }
  76. const (
  77. ZhiosOrderTrackUpdateForTbConsumeFunName = "ZhiosOrderTrackUpdateForTbConsume"
  78. ZhiosOrderTrackCreateForTbConsumeFunName = "ZhiosOrderTrackCreateForTbConsume"
  79. ZhiosOrderTrackCreateForJdConsumeFunName = "ZhiosOrderTrackCreateForJdConsume"
  80. ZhiosOrderTrackCreateForPddConsumeFunName = "ZhiosOrderTrackCreateForPddConsume"
  81. ZhiosOrderTrackUpdateForJdConsumeFunName = "ZhiosOrderTrackUpdateForJdConsume"
  82. ZhiosOrderTrackRefundForTbAllConsumeFunName = "ZhiosOrderTrackRefundForTbAllConsume"
  83. ZhiosOrderTrackRefundForTbPartConsumeFunName = "ZhiosOrderTrackRefundForTbPartConsume"
  84. )