We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
https://github.com/zeromicro/go-queue/blob/master/kq/pusher.go
p.Push()后 Push.Close() 没有等数据发送完就返回了, 这个时候程序退出 , 消息并没有发送出去就没了
p.Push()
Push.Close()
运行环境
go version go1.19.2 linux/amd64
package main import ( "fmt" "log" "time" "github.com/zeromicro/go-queue/kq" ) func main() { push := kq.NewPusher([]string{"localhost:9092"}, "pushtest", kq.WithChunkSize(5000000), kq.WithFlushInterval(5 * time.Second)) defer push.Close() for i:=0; i<10; i++ { err := push.Push(fmt.Sprintf("Hello world: %d", i)) if err != nil { log.Panic(err) } } }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
https://github.com/zeromicro/go-queue/blob/master/kq/pusher.go
p.Push()
后Push.Close()
没有等数据发送完就返回了, 这个时候程序退出 , 消息并没有发送出去就没了运行环境
The text was updated successfully, but these errors were encountered: