From e43d9654187effc03f5edbb11aa2050c49c6e63f Mon Sep 17 00:00:00 2001 From: minghsu0107 Date: Tue, 31 Jan 2023 13:28:26 +0800 Subject: [PATCH] Revert "fix subscriber id" This reverts commit 412437d9afcbe4721fbc5fa023684501efdf6939. --- pkg/config/config.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/config/config.go b/pkg/config/config.go index c154ed6..cff7926 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -1,7 +1,8 @@ package config import ( - "github.com/ThreeDotsLabs/watermill" + "os" + "github.com/spf13/viper" ) @@ -188,7 +189,7 @@ func setDefault() { viper.SetDefault("chat.grpc.server.port", "4000") viper.SetDefault("chat.grpc.client.user.endpoint", "localhost:4001") viper.SetDefault("chat.grpc.client.forwarder.endpoint", "localhost:4002") - viper.SetDefault("chat.subscriber.id", "rc.msg.sub."+watermill.NewShortUUID()) + viper.SetDefault("chat.subscriber.id", "rc.msg."+os.Getenv("HOSTNAME")) viper.SetDefault("chat.message.maxNum", 5000) viper.SetDefault("chat.message.paginationNum", 5000) viper.SetDefault("chat.message.maxSizeByte", 4096)