Skip to content

feat(messagequeue)!: remove PublishAfter and the visible_after column - #490

Draft
behinddwalls wants to merge 1 commit into
preetam/hold-migrate-orchestratorfrom
preetam/remove-publishafter
Draft

feat(messagequeue)!: remove PublishAfter and the visible_after column#490
behinddwalls wants to merge 1 commit into
preetam/hold-migrate-orchestratorfrom
preetam/remove-publishafter

Conversation

@behinddwalls

@behinddwalls behinddwalls commented Aug 1, 2026

Copy link
Copy Markdown
Collaborator

Summary

Why?

PublishAfter existed for one pattern: a consumer acking its own delivery and republishing a delayed copy to keep a poll or gate-wait loop alive. The two previous commits migrated all three such loops (stovepipe process/buildsignal, orchestrator buildsignal) to the hold primitive, leaving PublishAfter with zero callers. Removing it shrinks the publisher contract to a single verb and deletes the delayed-visibility machinery that existed only to serve it.

What?

Publisher loses PublishAfter; the mysql impl deletes its method, folds InsertDelayed back into Insert, drops FetchByOffset's nowMs parameter and its visible_after filter, removes the column from the queue_messages schema and the MoveToDLQ column list, and regenerates mocks. Tests covering delayed publish/fetch are deleted; the misnamed TestPublisher_PublishAfterClose (which tests Publish on a closed publisher) is renamed. READMEs drop the PublishAfter guidance — a consumer defers its own delivery with Hold/Postpone, and no caller needed cross-topic delayed publishing.

Deployment note: the schema files here are applied by dev/test stacks; a live database needs ALTER TABLE queue_messages DROP COLUMN visible_after (old rows with a pending visible_after would become immediately visible on rollout, which is the correct degradation — those rows were minted by the pre-hold republish pattern and their consumers supersede/no-op them).

Test Plan

make test (83 targets). ✅ bazel test //test/integration/extension/messagequeue/... — full queue behavior including idempotent publish, DLQ, postpone barrier. ✅ make fmt, make mocks.

Stack

  1. docs(rfc): consumer hold — postpone a delivery as a partition barrier #486
  2. feat(platform): hold/postpone — a fourth delivery outcome for backing off #487
  3. feat(stovepipe): migrate process and buildsignal waits to the hold primitive #488
  4. feat(orchestrator): migrate the buildsignal poll loop to the hold primitive #489
  5. @ feat(messagequeue)!: remove PublishAfter and the visible_after column #490
  6. feat(messagequeue)!: drop the requeue delay parameter from Nack #491
  7. feat(consumergate)!: rebuild the gate on the postpone primitive #492

## Summary

### Why?

PublishAfter existed for one pattern: a consumer acking its own delivery and republishing a delayed copy to keep a poll or gate-wait loop alive. The two previous commits migrated all three such loops (stovepipe process/buildsignal, orchestrator buildsignal) to the hold primitive, leaving PublishAfter with zero callers. Removing it shrinks the publisher contract to a single verb and deletes the delayed-visibility machinery that existed only to serve it.

### What?

Publisher loses PublishAfter; the mysql impl deletes its method, folds InsertDelayed back into Insert, drops FetchByOffset's nowMs parameter and its visible_after filter, removes the column from the queue_messages schema and the MoveToDLQ column list, and regenerates mocks. Tests covering delayed publish/fetch are deleted; the misnamed TestPublisher_PublishAfterClose (which tests Publish on a closed publisher) is renamed. READMEs drop the PublishAfter guidance — a consumer defers its own delivery with Hold/Postpone, and no caller needed cross-topic delayed publishing.

Deployment note: the schema files here are applied by dev/test stacks; a live database needs `ALTER TABLE queue_messages DROP COLUMN visible_after` (old rows with a pending visible_after would become immediately visible on rollout, which is the correct degradation — those rows were minted by the pre-hold republish pattern and their consumers supersede/no-op them).

## Test Plan

✅ `make test` (83 targets). ✅ `bazel test //test/integration/extension/messagequeue/...` — full queue behavior including idempotent publish, DLQ, postpone barrier. ✅ `make fmt`, `make mocks`.
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.

1 participant