Hand over subscriptions
A lowtide subscription created in step 1 has kept every message published to lowtide since then, unconsumed. The hand-over makes it start where the Pub/Sub subscription stands, so that every message still unacknowledged on Pub/Sub is also delivered by lowtide. Some messages arrive on both sides. None are missed.
How the starting point is chosen
Section titled “How the starting point is chosen”- lowtide reads the Pub/Sub subscription’s oldest unacknowledged message age from Cloud Monitoring (
subscription/oldest_unacked_message_age): the newest sample, with ageaat timet. - Every message still unacknowledged on Pub/Sub was published to Pub/Sub at or after
t − a, and to lowtide earlier by at most the mirror’s lag. So lowtide seeks its subscription tot − a − margin. The margin is 60 seconds by default and covers the lag. - Messages before that point count as acknowledged in lowtide. Messages after it are delivered.
It refuses when that point is before the mirror started, before the last publisher moved, or before the lowtide subscription was created. Pub/Sub’s backlog could then hold messages published straight to Pub/Sub, which lowtide never saw. Let the Pub/Sub consumers catch up and try again.
Cloud Monitoring samples every minute and lags a few minutes behind. The hand-over uses the sample’s own time, so an older sample only means an earlier starting point and more duplicates.
Hand over one subscription
Section titled “Hand over one subscription”- Preview. In the console, select Hand over on the subscription. The agent works out the starting point and how many messages will arrive twice, and you confirm. From your shell:
lowtide-migrate handover --dry-run. - Hand over. lowtide seeks its subscription to that point.
- Start the consumers on lowtide, then stop them on Pub/Sub. What the Pub/Sub consumers process in between arrives again from lowtide: duplicates, never gaps. They carry the same
lowtide-origin-message-idon both sides.
lowtide-migrate handover --subscription projects/acme/subscriptions/orders-billing \ --publishers-moved-at 2026-12-01T10:15:00ZOrdered subscriptions
Section titled “Ordered subscriptions”Stop the Pub/Sub consumers first, then hand over, then start the lowtide consumers. That way no key is processed on both sides at once. The console asks you to confirm the consumers are stopped, and the CLI prints the order.
Push, BigQuery and Cloud Storage subscriptions
Section titled “Push, BigQuery and Cloud Storage subscriptions”These were created in lowtide as pull subscriptions. Starting them on lowtide means setting their delivery settings: the console copies them from Pub/Sub right after the seek, and the CLI does with --copy-delivery-config. Until you finish the subscription, Pub/Sub keeps delivering too, so both sides deliver. Finish it once lowtide’s deliveries are confirmed.
For BigQuery and Cloud Storage, the gateway’s service account writes, so it needs access to the dataset or bucket first (Permissions).
Finish: detach in Pub/Sub
Section titled “Finish: detach in Pub/Sub”Once lowtide’s consumers keep up, finish the subscription. lowtide checks that consumers are attached to the lowtide subscription and that its oldest unacknowledged message is younger than 5 minutes. Then it:
- sets the Pub/Sub subscription to never expire,
- detaches it in Pub/Sub, so Pub/Sub stops delivering to it and charging for it,
- gives the lowtide subscription back the expiration policy the Pub/Sub one had.
lowtide-migrate finish --subscription projects/acme/subscriptions/orders-billingDetaching can’t be undone. Before you finish, a rollback is only a configuration change (Roll back).
Why the detached subscription stays
Section titled “Why the detached subscription stays”A detached subscription keeps its IAM policy. Cloud IAM authorization checks permissions on it unchanged, so consumers whose grants are on the subscription keep consuming from lowtide. Detaching takes effect within about a minute. After that, pulls on Pub/Sub fail with FAILED_PRECONDITION, it receives nothing and costs nothing, and it is no longer listed under the topic.
Pub/Sub deletes a subscription after 31 days without activity, and the IAM policy with it. A migrated subscription has no activity in Pub/Sub, so finish sets it to never expire first. If you detach one yourself, do the same:
gcloud pubsub subscriptions update SUBSCRIPTION --expiration-period=neverWhen every subscription is done
Section titled “When every subscription is done”Turn the mirror off. The console and lowtide-migrate mirror off refuse while a subscription is still attached in Pub/Sub.
Subscriptions that exist only in lowtide have shadows in Pub/Sub attached to the topic. They don’t count: they are pull subscriptions nobody pulls.