bootstrap.yml 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. server:
  2. port: 8879
  3. spring:
  4. application:
  5. name: message-service
  6. thymeleaf:
  7. cache: false
  8. jackson:
  9. date-format: yyyy-MM-dd HH:mm:ss
  10. time-zone: GMT+8
  11. serialization:
  12. write-dates-as-timestamps: false
  13. cloud:
  14. config:
  15. discovery:
  16. enabled: true
  17. service-id: config-center
  18. redis:
  19. jedis:
  20. pool:
  21. max-active: 8 # 连接池最大连接数(使用负值表示没有限制)
  22. max-idle: 5 # 连接池中的最大空闲连接
  23. max-wait: -1 # 连接池最大阻塞等待时间(使用负值表示没有限制)
  24. min-idle: 0 # 连接池中的最小空闲连接
  25. timeout: 20000 # 连接超时时间(毫秒)
  26. rabbitmq:
  27. publisher-confirm-type: correlated # 确认消息已发送到交换机(Exchange) 发送确认
  28. publisher-returns: true # 确认消息已发送到队列(Queue) 发送回调
  29. connection-timeout: 4000
  30. template:
  31. mandatory: true # 当exchange无法找到任何一个合适的queue时,将消息return给生产者
  32. receive-timeout: 30000 # 消费端接收的响应时间
  33. reply-timeout: 30000 # 发送端等待接收消费端给出return msg的时间,相当于在message同步时,发送并消费成功的时间
  34. retry:
  35. enabled: true
  36. max-attempts: 6 # 最大重试次数
  37. initial-interval: 2000 # 重试初始间隔时间
  38. multiplier: 2 # 间隔时间乘子,间隔时间*乘子=下一次的间隔时间,最大不能超过设置的最大间隔时间
  39. max-interval: 64000 # 最大重试时间间隔
  40. listener:
  41. simple:
  42. acknowledge-mode: auto # 自动确认
  43. auto-startup: true # 是否启动时自动启动容器
  44. concurrency: 1 # 最小的消费者数量
  45. max-concurrency: 5 # 最大的消费者数量
  46. default-requeue-rejected: true # 投递失败时是否重新排队;默认是true(与参数acknowledge-mode有关系)
  47. retry:
  48. enabled: true
  49. max-attempts: 6
  50. initial-interval: 2000
  51. multiplier: 2
  52. max-interval: 64000
  53. stateless: true # 不论重试是有状态的还是无状态的
  54. profiles:
  55. active: debug
  56. eureka:
  57. client:
  58. service-url:
  59. defaultZone: http://${eureka-addr:localhost}:${eureka-port:6751}/eureka/
  60. logging:
  61. config: classpath:logback-spring.xml
  62. level:
  63. root: ${log-level:info}
  64. file:
  65. path: /logs/message-service
  66. management:
  67. endpoints:
  68. web:
  69. exposure:
  70. include: '*'
  71. endpoint:
  72. health:
  73. show-details: always
  74. feign:
  75. okhttp:
  76. enabled: true
  77. ribbon:
  78. ConnectTimeout: 3000 # 服务请求连接超时时间(毫秒)
  79. ReadTimeout: 3000 # 服务请求处理超时时间(毫秒)
  80. swagger.title: 讯息中心
  81. swagger.des: 讯息中心—相关接口文档
  82. swagger.version: 0.0.1-SNAPSHOT