subscriber keep connected to the balancer

This commit is contained in:
chrislu
2023-12-28 11:56:37 -08:00
parent bebbc9fe44
commit c950a40aad
9 changed files with 375 additions and 246 deletions

View File

@@ -12,6 +12,11 @@ import (
// If a partition is moved to another broker, the subscriber will automatically reconnect to the new broker.
func (sub *TopicSubscriber) Subscribe() error {
// loop forever
sub.doKeepConnectedToSubCoordinator()
index := -1
util.RetryUntil("subscribe", func() error {
index++