feat(queue/sql): add publisher implementation#22
Merged
Conversation
This was referenced Feb 17, 2026
de255c6 to
aef1d67
Compare
8618be1 to
5925535
Compare
aef1d67 to
d64e7ab
Compare
5925535 to
e1143ed
Compare
d64e7ab to
7e18f89
Compare
e1143ed to
160fc71
Compare
7e18f89 to
abe7aee
Compare
6b9a01f to
74d181d
Compare
abe7aee to
3e04b8e
Compare
74d181d to
c0eea0f
Compare
19130c8 to
29df5c6
Compare
c0eea0f to
2577b76
Compare
29df5c6 to
235f7e1
Compare
1386759 to
3a8459a
Compare
3a8459a to
c19e90d
Compare
sbalabanov
requested changes
Feb 19, 2026
7dcf5fb to
fc19779
Compare
20d554f to
ed4c674
Compare
331f173 to
d7597af
Compare
sbalabanov
approved these changes
Feb 20, 2026
- Implement Publisher interface with SQL MessageStore backend - Add gomock-based mocks for MessageStore interface - Use fixed timestamps in tests for repeatability - Optimize mutex usage: only lock for closed flag check - Move logging outside mutex to avoid I/O under lock - Extract validateTopicName to validation.go for sharing - Add comprehensive test coverage for publish, close, validation, and concurrency
d7597af to
0dde36e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Why?
Need Publisher implementation to enable message publishing to SQL queue topics.
What?
Publisher validates topic names and publishes single messages via MessageStore
Thread-safe with RWMutex for concurrent publish calls
Idempotent Close() operation
Comprehensive test coverage for publish, validation, metrics, and concurrency
Single and multiple message publishing tested
Invalid topic names rejected (uppercase, special chars, empty)
Publisher closed state prevents further publishes
Concurrent publish operations verified thread-safe
Context cancellation handled correctly
Test Plan
make test
Issues
Stack