message-service-local.yml 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. spring:
  2. redis:
  3. database: 12
  4. host: 192.168.2.237 # Redis服务器地址
  5. port: 63791 # Redis服务器连接端口(本地环境端口6378,其他环境端口是6379)
  6. password: emrais # Redis服务器连接密码(默认为空)
  7. jedis:
  8. pool:
  9. max-active: 8 # 连接池最大连接数(使用负值表示没有限制)
  10. max-idle: 5 # 连接池中的最大空闲连接
  11. max-wait: -1 # 连接池最大阻塞等待时间(使用负值表示没有限制)
  12. min-idle: 0 # 连接池中的最小空闲连接
  13. timeout: 20000 # 连接超时时间(毫秒)
  14. rabbitmq:
  15. host: 192.168.2.237
  16. port: 5672
  17. username: emrais
  18. password: emrais
  19. virtual-host: /emrais # 虚拟host
  20. publisher-confirm-type: correlated # 确认消息已发送到交换机(Exchange) 发送确认
  21. publisher-returns: true # 确认消息已发送到队列(Queue) 发送回调
  22. connection-timeout: 4000
  23. template:
  24. mandatory: true # 当exchange无法找到任何一个合适的queue时,将消息return给生产者
  25. receive-timeout: 30000 # 消费端接收的响应时间
  26. reply-timeout: 30000 # 发送端等待接收消费端给出return msg的时间,相当于在message同步时,发送并消费成功的时间
  27. retry:
  28. enabled: true
  29. max-attempts: 6 # 最大重试次数
  30. initial-interval: 2000 # 重试初始间隔时间
  31. multiplier: 2 # 间隔时间乘子,间隔时间*乘子=下一次的间隔时间,最大不能超过设置的最大间隔时间
  32. max-interval: 64000 # 最大重试时间间隔
  33. listener:
  34. simple:
  35. acknowledge-mode: auto # 自动确认
  36. auto-startup: true # 是否启动时自动启动容器
  37. concurrency: 1 # 最小的消费者数量
  38. max-concurrency: 5 # 最大的消费者数量
  39. default-requeue-rejected: true # 投递失败时是否重新排队;默认是true(与参数acknowledge-mode有关系)
  40. retry:
  41. enabled: true
  42. max-attempts: 6
  43. initial-interval: 2000
  44. multiplier: 2
  45. max-interval: 64000
  46. stateless: true # 不论重试是有状态的还是无状态的
  47. rabbitmq:
  48. mqtt:
  49. url: tcp://192.168.2.237:1883
  50. front-url: ws://192.168.2.237:15675/ws
  51. defaultTopic: defaultSampleTopic
  52. swagger.show: true