From 08d25825e23349e9aaedfec1be4ce1e8ef246aaf Mon Sep 17 00:00:00 2001 From: yinheli Date: Fri, 29 Oct 2021 18:09:06 +0800 Subject: [PATCH] fix: clientId --- pkg/kafkax/kafka.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/kafkax/kafka.go b/pkg/kafkax/kafka.go index f6c40aa..58794b2 100644 --- a/pkg/kafkax/kafka.go +++ b/pkg/kafkax/kafka.go @@ -90,7 +90,7 @@ func New(name string, cfg ...*sarama.Config) (Client, error) { if hostname == "" { hostname = netx.InternalIp() } - config.ClientID = fmt.Sprint("sarama", "/", hostname, "/", os.Getpid()) + config.ClientID = fmt.Sprint("sarama", "_", hostname, "_", os.Getpid()) config.Consumer.Return.Errors = true config.Producer.Return.Successes = true