Skip to content

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

Merged
behinddwalls merged 1 commit into
mainfrom
preetam/remove-publishafter
Aug 5, 2026
Merged

feat(messagequeue)!: remove PublishAfter and the visible_after column#490
behinddwalls merged 1 commit into
mainfrom
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

@behinddwalls
behinddwalls force-pushed the preetam/remove-publishafter branch from 30fb699 to dbe06d5 Compare August 4, 2026 23:38
@behinddwalls
behinddwalls force-pushed the preetam/remove-publishafter branch from dbe06d5 to 62f08a8 Compare August 4, 2026 23:57
@behinddwalls
behinddwalls force-pushed the preetam/remove-publishafter branch from 62f08a8 to 266c9d2 Compare August 5, 2026 00:08
Base automatically changed from preetam/hold-migrate-orchestrator to main August 5, 2026 04:47
## 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`.
@behinddwalls
behinddwalls force-pushed the preetam/remove-publishafter branch from 266c9d2 to d129154 Compare August 5, 2026 04:47
@behinddwalls
behinddwalls added this pull request to the merge queue Aug 5, 2026
Merged via the queue into main with commit 797ee0b Aug 5, 2026
15 checks passed
@behinddwalls
behinddwalls deleted the preetam/remove-publishafter branch August 5, 2026 05:16
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.

2 participants