Skip to content

refactor(consumer): separate TopicKey from topic name in TopicRegistry#83

Merged
behinddwalls merged 1 commit into
mainfrom
preetam/topic-registry
Feb 25, 2026
Merged

refactor(consumer): separate TopicKey from topic name in TopicRegistry#83
behinddwalls merged 1 commit into
mainfrom
preetam/topic-registry

Conversation

@behinddwalls
Copy link
Copy Markdown
Collaborator

@behinddwalls behinddwalls commented Feb 25, 2026

Summary

  • Introduces TopicKey as a fixed pipeline stage identifier, separate from the actual queue topic name, allowing library consumers to provide their own naming conventions
  • Bundles Key, Name, Queue, and Subscription into a single TopicConfig struct passed to NewTopicRegistry
  • Moves topic name validation from MySQL publisher/subscriber (runtime) into NewTopicRegistry (construction time) for fail-fast behavior

Test plan

  • All unit tests pass (19/19)
  • All integration tests pass (5/5)
  • All e2e tests pass (1/1)
  • make gazelle — BUILD files in sync

@behinddwalls behinddwalls requested review from a team and sbalabanov as code owners February 25, 2026 22:51
@behinddwalls behinddwalls force-pushed the preetam/topic-registry branch from 879b485 to c861796 Compare February 25, 2026 23:28
Remove redundant Topic field from SubscriptionConfig. The Subscriber.Subscribe()
interface already takes topic as a separate parameter, so SubscriptionConfig.Topic
was never read. Simplify DefaultSubscriptionConfig to take only subscriberName and
consumerGroup.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@behinddwalls behinddwalls force-pushed the preetam/topic-registry branch from c861796 to 553ddd5 Compare February 25, 2026 23:33
@behinddwalls behinddwalls merged commit 0c51767 into main Feb 25, 2026
8 checks passed
@behinddwalls behinddwalls deleted the preetam/topic-registry branch June 2, 2026 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants