application.yml 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. server:
  2. port: 9402
  3. # Spring
  4. spring:
  5. application:
  6. # 应用名称
  7. name: ruoyi-stream-mq
  8. profiles:
  9. # 环境配置
  10. active: @profiles.active@
  11. cloud:
  12. stream:
  13. function:
  14. # 重点配置 与 binding 名与消费者对应
  15. definition: delay;demo;log
  16. --- # rabbitmq 配置
  17. spring:
  18. rabbitmq:
  19. host: localhost
  20. port: 5672
  21. username: root
  22. password: root
  23. cloud:
  24. stream:
  25. rabbit:
  26. bindings:
  27. delay-in-0:
  28. consumer:
  29. delayedExchange: true
  30. delay-out-0:
  31. producer:
  32. delayedExchange: true
  33. bindings:
  34. delay-in-0:
  35. destination: delay.exchange.cloud
  36. content-type: application/json
  37. group: delay-group
  38. binder: rabbit
  39. delay-out-0:
  40. destination: delay.exchange.cloud
  41. content-type: application/json
  42. group: delay-group
  43. binder: rabbit
  44. --- # rocketmq 配置
  45. spring:
  46. cloud:
  47. stream:
  48. rocketmq:
  49. binder:
  50. # rocketmq 地址
  51. name-server: localhost:9876
  52. bindings:
  53. demo-out-0:
  54. producer:
  55. # 必须得写
  56. group: default
  57. bindings:
  58. demo-out-0:
  59. content-type: application/json
  60. destination: stream-test-topic
  61. group: test-group
  62. binder: rocketmq
  63. demo-in-0:
  64. content-type: application/json
  65. destination: stream-test-topic
  66. group: test-group
  67. binder: rocketmq
  68. --- # kafka 配置
  69. spring:
  70. cloud:
  71. stream:
  72. kafka:
  73. binder:
  74. brokers: localhost:9092
  75. bindings:
  76. log-out-0:
  77. destination: stream-log-topic
  78. contentType: application/json
  79. group: log_group
  80. binder: kafka
  81. log-in-0:
  82. destination: stream-log-topic
  83. contentType: application/json
  84. group: log_group
  85. binder: kafka
  86. --- # nacos 配置
  87. spring:
  88. cloud:
  89. nacos:
  90. # nacos 服务地址
  91. server-addr: @nacos.server@
  92. discovery:
  93. # 注册组
  94. group: @nacos.discovery.group@
  95. namespace: ${spring.profiles.active}
  96. config:
  97. # 配置组
  98. group: @nacos.config.group@
  99. namespace: ${spring.profiles.active}
  100. username: @nacos.username@
  101. password: @nacos.password@
  102. config:
  103. import:
  104. - optional:nacos:application-common.yml