This commit is contained in:
zhoujia
2025-10-24 15:51:46 +08:00
parent 057a095596
commit c61d154937
23 changed files with 3092 additions and 8 deletions

View File

@ -0,0 +1,42 @@
server:
port: 8080
spring:
application:
name: redis-stream-demo
redis:
host: localhost
port: 6379
password:
database: 0
timeout: 10000ms # 增加超时时间到10秒
lettuce:
pool:
max-active: 8
max-wait: 5000ms # 设置合理的等待时间
max-idle: 8
min-idle: 0
# Redis Stream Configuration
redis:
stream:
key: "message-stream"
consumer-group: "message-consumer-group"
consumer-name: "message-consumer"
# 消费者模式配置
consumer:
# 默认模式: stream-listener, manual-ack, both
default-mode: "both"
# 是否启用 StreamListener 模式
stream-listener-enabled: false
# 是否启用 Manual Ack 模式
manual-ack-enabled: false
# Logging Configuration
logging:
level:
com.example: DEBUG
org.springframework.data.redis: DEBUG
io.lettuce: DEBUG