chore(infra): 增加本地中间件编排、环境配置与 Kafka 降级支持
This commit is contained in:
@@ -18,17 +18,24 @@ eureka:
|
||||
enabled: false
|
||||
|
||||
# DB 仅在真实实装接入后需要;stub 模式不建连——datasources.default.enabled=false 经
|
||||
# micronaut-jdbc 的 JdbcDataSourceEnabled 条件排除 DataSource bean("stub 不建连"落地);
|
||||
# 下方 url 仍保留合法默认(host/port/name 分拆,避免占位符默认值内嵌冒号解析坏)。
|
||||
# 真实接入时:设 MSGX_DB_URL(或 MSGX_DB_HOST/PORT/NAME)+ enabled=true。
|
||||
# micronaut-jdbc 的 JdbcDataSourceEnabled 条件排除 DataSource bean("stub 不建连"落地)。
|
||||
# 遵循 ACM2-12/ACM2-13 自有数据库(PostgreSQL)口径。真实接入时:设 MSGX_PG_URL + enabled=true。
|
||||
datasources:
|
||||
default:
|
||||
enabled: false
|
||||
url: jdbc:mysql://${MSGX_DB_HOST:127.0.0.1}:${MSGX_DB_PORT:3306}/${MSGX_DB_NAME:msgexchange_dev}
|
||||
username: ${MSGX_DB_USER:root}
|
||||
password: ${MSGX_DB_PASSWORD:}
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
url: jdbc:postgresql://${MSGX_PG_HOST:127.0.0.1}:${MSGX_PG_PORT:5432}/${MSGX_PG_NAME:msgx}
|
||||
username: ${MSGX_PG_USER:msgx_dev}
|
||||
password: ${MSGX_PG_PASSWORD:msgx_dev_pass}
|
||||
driver-class-name: org.postgresql.Driver
|
||||
|
||||
# 共享信箱 MySQL 适配配置(ACM2-12/ACM2-13):
|
||||
mailbox:
|
||||
shared-mysql:
|
||||
enabled: false
|
||||
url: jdbc:mysql://${MSGX_MAILBOX_HOST:127.0.0.1}:${MSGX_MAILBOX_PORT:3306}/${MSGX_MAILBOX_NAME:cdairport}?useSSL=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai&characterEncoding=utf8mb4
|
||||
username: ${MSGX_MAILBOX_USER:msgx_dev}
|
||||
password: ${MSGX_MAILBOX_PASSWORD:msgx_dev_pass}
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
# stub 模式无 DataSource:Flyway 显式关闭(主配置默认 enabled:true 只作用于有 DataSource 的环境)
|
||||
flyway:
|
||||
datasources:
|
||||
|
||||
@@ -58,6 +58,7 @@ flyway:
|
||||
# (CminmsgMailbox/OutboxMailbox)随 U05 批次引入。
|
||||
mailbox:
|
||||
shared-mysql:
|
||||
enabled: false
|
||||
url: ${MSGX_MAILBOX_URL}
|
||||
username: ${MSGX_MAILBOX_USER}
|
||||
password: ${MSGX_MAILBOX_PASSWORD}
|
||||
@@ -71,9 +72,11 @@ kafka:
|
||||
servers: ${MSGX_KAFKA_SERVERS}
|
||||
producers:
|
||||
default: # U03/R09:Micronaut Kafka 按具名 producer 解析,须有 default 层
|
||||
acks: all
|
||||
enable-idempotence: true
|
||||
|
||||
# 默认 acks=all + 幂等(现代 Kafka 3.x+);若对接旧版 Broker(如现网 0.10.x/1.x,无 INIT_PRODUCER_ID 协议),
|
||||
# 经 MSGX_KAFKA_ACKS=1 与 MSGX_KAFKA_IDEMPOTENCE=false 降级兼容。
|
||||
acks: ${MSGX_KAFKA_ACKS:all}
|
||||
enable-idempotence: ${MSGX_KAFKA_IDEMPOTENCE:true}
|
||||
max-in-flight-requests-per-connection: ${MSGX_KAFKA_MAX_IN_FLIGHT:5}
|
||||
eureka:
|
||||
client:
|
||||
registration:
|
||||
|
||||
Reference in New Issue
Block a user