feat (queue/ctl): add queue admin CLI for MySQL queue inspection and management#61
Merged
Conversation
3 tasks
9c84ee7 to
67d428a
Compare
behinddwalls
added a commit
that referenced
this pull request
Feb 24, 2026
…sql (#60) ## Summary - Renames `extension/queue/sql` → `extension/queue/mysql` to align with existing naming conventions (`extension/storage/mysql`, `extension/counter/mysql`) - Updates package declarations, import paths, BUILD.bazel files, and all references across the codebase (Makefile, docs, test utilities, integration tests, e2e tests) - The generic `sql` package name is replaced with `mysql` to make the backend explicit ## Test plan - [x] `make gazelle` — BUILD files regenerated successfully - [x] `make build` — all 54 targets build successfully - [x] `make test` — all 8 unit tests pass (including `//extension/queue/mysql:mysql_test`) ## Stack 1. @ #60 1. #61
sbalabanov
approved these changes
Feb 24, 2026
8b53c35 to
f72c4da
Compare
Adds a Cobra-based CLI tool (queue-admin) for inspecting, managing, and troubleshooting the MySQL-backed message queue. Operates directly on the queue database tables (queue_messages, queue_offsets, queue_partition_leases). Commands: list-topics, topic-stats, list-messages, inspect-message, delete-message, purge-topic, list-dlq, requeue-dlq, purge-dlq, list-offsets, reset-offset, list-leases, consumer-lag, stale-leases, release-lease. All read commands support --json output. Library code in ctl/lib/ is importable for integration testing. Includes unit tests with go-sqlmock and integration tests using publisher/subscriber to create state, then AdminStore to verify.
b1efe05 to
113b0b1
Compare
Topic names like "to-batch" and "build-signal" were rejected by validateTopicName which only allowed [a-z0-9_]. Since topic names are used as column values (not SQL identifiers), hyphens are safe. Also adds AllTopics and a test that auto-validates all defined topics. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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
Adds a Cobra-based CLI tool (queue-admin) for inspecting, managing, and
troubleshooting the MySQL-backed message queue. Operates directly on the
queue database tables (queue_messages, queue_offsets, queue_partition_leases).
Commands: list-topics, topic-stats, list-messages, inspect-message,
delete-message, purge-topic, list-dlq, requeue-dlq, purge-dlq,
list-offsets, reset-offset, list-leases, consumer-lag, stale-leases,
release-lease. All read commands support --json output.
Library code in ctl/lib/ is importable for integration testing.
Includes unit tests with go-sqlmock and integration tests using
publisher/subscriber to create state, then AdminStore to verify.
Test Plan
Issues