seaweedfs/weed/mq/client/sub_client/subscribe.go

12 lines
308 B
Go
Raw Normal View History

2023-08-29 00:02:12 +08:00
package sub_client
2023-09-05 12:43:50 +08:00
// Subscribe subscribes to a topic's specified partitions.
// If a partition is moved to another broker, the subscriber will automatically reconnect to the new broker.
2023-08-29 00:02:12 +08:00
2023-09-05 12:43:50 +08:00
func (sub *TopicSubscriber) Subscribe() error {
// loop forever
sub.doKeepConnectedToSubCoordinator()
2023-09-01 15:36:51 +08:00
return nil
2023-08-29 00:02:12 +08:00
}