Create a topic with message ordering support (ordering is enabled per-subscription, not per-topic); create a push subscription with --enable-message-ordering
Publish messages with an orderingKey field; all messages with the same ordering key are delivered to the push endpoint in the order they were published
Configure a dead-letter topic on the subscription: gcloud pubsub subscriptions modify-push-config my-sub --dead-letter-topic=projects/my-project/topics/my-dlq --max-delivery-attempts=5
Grant the Pub/Sub service account pubsub.publisher role on the dead-letter topic and pubsub.subscriber role on the source subscription so it can forward and acknowledge undeliverable messages
Subscribe a separate consumer to the dead-letter topic to inspect and handle failed messages
If an ordering-key group becomes paused due to repeated push failures, call subscriptions.modifyAckDeadline or use the resumeConsumption API to unblock processing for that key
Known gotchas
A dead-letter topic breaks ordering guarantees for a key: once a message for a given ordering key is dead-lettered, subsequent messages for the same key may also be dead-lettered until the key is explicitly resumed
Max delivery attempts on a dead-letter subscription counts cumulative Pub/Sub delivery attempts, not your application's own retry logic; set it high enough to allow legitimate transient retries
Push subscriptions require an HTTPS endpoint with a valid certificate; Pub/Sub will not deliver to self-signed or HTTP endpoints
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp