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.
 
 
 

48 lines
1.5 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. const (
  41. CanalOrderConsumeFunName = "CanalOrderConsume"
  42. CanalGuideOrderConsumeFunName = "CanalGuideOrderConsume"
  43. ZhiOsUserVisitIpAddressConsumeFunName = "ZhiOsUserVisitIpAddressConsume"
  44. )