can pub and sub

This commit is contained in:
chrislu
2023-09-01 00:36:51 -07:00
parent 1eb2da46d5
commit cb470d44df
11 changed files with 435 additions and 275 deletions

View File

@@ -25,6 +25,7 @@ func (manager *LocalTopicManager) AddTopicPartition(topic Topic, localPartition
Partitions: make([]*LocalPartition, 0),
}
}
manager.topics.SetIfAbsent(topic.String(), localTopic)
if localTopic.findPartition(localPartition.Partition) != nil {
return
}