Create a Pub/Sub topic with message ordering enabled; this cannot be changed after creation
Create a subscription on the topic with enable_message_ordering=true
When publishing, set the ordering_key field on each PubsubMessage to the value that should be sequenced together
Use a publisher client that supports ordering and ensure messages with the same ordering key are published from the same publisher client instance
Consume messages sequentially per ordering key; acknowledge each message before the next one for the same key is delivered
Known gotchas
If a publish fails for a given ordering key, the publisher must call resumePublish(orderingKey) before further messages on that key are accepted, or subsequent publishes are rejected
Ordering is only guaranteed within a single region; cross-region Pub/Sub does not preserve ordering
High-throughput scenarios with many distinct ordering keys can reduce parallelism; model ordering keys at the right granularity to balance ordering and throughput
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