Skip to content

Commit 03b11a8

Browse files
committed
Prefix routing key
1 parent 706e97b commit 03b11a8

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

brokers/redis/config.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ func (rc *RedisConfig) Init() error {
3030
}
3131

3232
if rc.StreamGroup == "" {
33-
rc.StreamGroup = "disq:"
33+
rc.StreamGroup = "disq"
3434
}
3535

3636
if rc.Concurency == 0 {

brokers/redis/list.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ func NewList(cfg *RedisConfig) disq.Broker {
3838
}
3939
broker := &List{
4040
Redis: cfg.Redis,
41-
list: cfg.Name + ":list",
41+
list: "disq:" + "{" + cfg.Name + ":list",
4242
opts: cfg,
4343
consumerName: disq.ConsumerName(),
4444
buffer: make(chan *disq.Message, cfg.BufferSize),

brokers/redis/stream.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ func NewStream(cfg *RedisConfig) disq.Broker {
4444
}
4545
broker := &Stream{
4646
Redis: cfg.Redis,
47-
zset: cfg.Name + ":zset",
48-
stream: cfg.Name + ":stream",
47+
zset: "disq:" + "{" + cfg.Name + "}:zset",
48+
stream: "disq:" + "{" + cfg.Name + "}:stream",
4949
streamGroup: cfg.StreamGroup,
5050
consumerName: disq.ConsumerName(),
5151
opts: cfg,

0 commit comments

Comments
 (0)