From c66cb5c6a877e0f0cc47d8248ee7c9c3d5f18401 Mon Sep 17 00:00:00 2001 From: zhangwenjian Date: Thu, 20 Aug 2026 10:54:53 +0800 Subject: [PATCH] fix: correct the commented-out queue.redis sample in settings.yml MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The sample had producer/consumer nested keys (streamMaxLength, approximateMaxLength, visibilityTimeout, bufferSize, concurrency, blockingTimeout, reclaimInterval) that don't exist on config.RedisQueue — checked against sdk/config/queue.go, which only reads addr, password, and the embedded RedisOptions fields, plus group, key_prefix and max_attempts. Filling in the old sample as written would compile and start fine, since it's YAML under a key the struct doesn't declare, and every one of those settings would be silently ignored. Replaced with the fields the struct actually has. Still commented out — redis stays opt-in, this only fixes what filling it in would produce. --- config/settings.yml | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/config/settings.yml b/config/settings.yml index 8e7ed870..6891632c 100644 --- a/config/settings.yml +++ b/config/settings.yml @@ -61,14 +61,8 @@ settings: # redis: # addr: 127.0.0.1:6379 # password: xxxxxx -# producer: -# streamMaxLength: 100 -# approximateMaxLength: true -# consumer: -# visibilityTimeout: 60 -# bufferSize: 100 -# concurrency: 10 -# blockingTimeout: 5 -# reclaimInterval: 1 +# group: go-admin # 消费组,同一应用的多个实例必须用同一个值 +# key_prefix: go-admin # 加在 stream key 前面,多个应用共用一个 redis 时用于隔离 +# max_attempts: 5 # 消息投递失败的最大重试次数 locker: redis: \ No newline at end of file