|
@ -6,7 +6,6 @@ import ( |
|
|
"github.com/seaweedfs/seaweedfs/weed/pb/mq_pb" |
|
|
"github.com/seaweedfs/seaweedfs/weed/pb/mq_pb" |
|
|
) |
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
type TopicConsumerGroups struct { |
|
|
type TopicConsumerGroups struct { |
|
|
// map a consumer group name to a consumer group
|
|
|
// map a consumer group name to a consumer group
|
|
|
ConsumerGroups cmap.ConcurrentMap[string, *ConsumerGroup] |
|
|
ConsumerGroups cmap.ConcurrentMap[string, *ConsumerGroup] |
|
@ -50,7 +49,7 @@ func toTopicName(topic *mq_pb.Topic) string { |
|
|
return topicName |
|
|
return topicName |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
func (c *Coordinator) AddSubscriber(consumerGroup, consumerGroupInstance string, topic *mq_pb.Topic) *ConsumerGroupInstance{ |
|
|
|
|
|
|
|
|
func (c *Coordinator) AddSubscriber(consumerGroup, consumerGroupInstance string, topic *mq_pb.Topic) *ConsumerGroupInstance { |
|
|
tcg := c.GetTopicConsumerGroups(topic) |
|
|
tcg := c.GetTopicConsumerGroups(topic) |
|
|
cg, _ := tcg.ConsumerGroups.Get(consumerGroup) |
|
|
cg, _ := tcg.ConsumerGroups.Get(consumerGroup) |
|
|
if cg == nil { |
|
|
if cg == nil { |
|
|