feat: 集成 Spring AMQP,使用 RabbitMQ 发送小说更新消息

默认关闭,通过 spring.rabbitmq.enable 配置属性来开启
This commit is contained in:
xiongxiaoyang
2022-05-25 09:39:25 +08:00
parent a8e2e2d5c9
commit e5592b85dd
30 changed files with 259 additions and 56 deletions

View File

@ -11,15 +11,9 @@ spring:
multipart:
max-file-size: 5MB
server:
port: 8888
---
spring:
datasource:
@ -30,10 +24,9 @@ spring:
activate:
on-profile: dev
---
spring:
# Redis 配置
redis:
host: 127.0.0.1
port: 6379
@ -41,6 +34,7 @@ spring:
config:
activate:
on-profile: dev
# Elasticsearch 配置
elasticsearch:
# 是否开启 elasticsearch 搜索引擎功能true-开启 false-不开启
enable: false
@ -48,6 +42,21 @@ spring:
- https://my-deployment-ce7ca3.es.us-central1.gcp.cloud.es.io:9243
username: elastic
password: qTjgYVKSuExX6tWAsDuvuvwl
amqp:
# 是否开启 Spring AMQPtrue-开启 false-不开启
enable: false
# RabbitMQ 配置
rabbitmq:
addresses: "amqp://guest:guest@47.106.243.172"
virtual-host: novel
template:
retry:
# 开启重试
enabled: true
# 最大重试次数
max-attempts: 3
# 第一次和第二次重试之间的持续时间
initial-interval: "3s"
---
spring: