Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion internal/subscription/core.go
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,13 @@ func (c *Core) Migrate(ctx context.Context, names []string) error {
err = c.topicCore.CreateSubscriptionTopic(ctx, &topic.Model{
Name: sub.GetSubscriptionTopic(),
ExtractedTopicName: sub.ExtractedSubscriptionName,
ExtractedProjectID: sub.ExtractedTopicProjectID,
ExtractedProjectID: sub.ExtractedSubscriptionProjectID,
NumPartitions: topicModel.NumPartitions,
})
err = c.topicCore.CreateRetryTopic(ctx, &topic.Model{
Name: sub.GetRetryTopic(),
ExtractedTopicName: sub.ExtractedSubscriptionName,
ExtractedProjectID: sub.ExtractedSubscriptionProjectID,
NumPartitions: topicModel.NumPartitions,
})
if err != nil {
Expand Down
4 changes: 2 additions & 2 deletions internal/subscription/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,12 @@ func (m *Model) GetTopic() string {

// GetSubscriptionTopic returns the topic used for subscription fanout topic
func (m *Model) GetSubscriptionTopic() string {
return topic.GetTopicName(m.ExtractedTopicProjectID, m.ExtractedSubscriptionName+topic.SubscriptionSuffix)
return topic.GetTopicName(m.ExtractedSubscriptionProjectID, m.ExtractedSubscriptionName+topic.SubscriptionSuffix)
}

// GetRetryTopic returns the topic used for subscription retries
func (m *Model) GetRetryTopic() string {
return topic.GetTopicName(m.ExtractedTopicProjectID, m.ExtractedSubscriptionName+topic.RetryTopicSuffix)
return topic.GetTopicName(m.ExtractedSubscriptionProjectID, m.ExtractedSubscriptionName+topic.RetryTopicSuffix)
}

// GetDeadLetterTopic returns the topic used for dead lettering for subscription
Expand Down