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

12 lines
308 B
Go
Raw Normal View History

2023-08-28 16:02:12 +00:00
package sub_client
2023-09-05 04:43:50 +00: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-28 16:02:12 +00:00
2023-09-05 04:43:50 +00:00
func (sub *TopicSubscriber) Subscribe() error {
// loop forever
sub.doKeepConnectedToSubCoordinator()
2023-09-01 07:36:51 +00:00
return nil
2023-08-28 16:02:12 +00:00
}