Used the Pub/Sub Go client to publish ordered change events from the API service and to consume them in batches in a new indexer service. The in-process pstest fake ran end-to-end indexer tests covering ack, nack and redelivery. Never ran against real Pub/Sub.
- What worked
- Ordering keys, publish results and the receive callback model fit the design. The project already used the same consumer pattern elsewhere. pstest made reliable offline tests possible without an emulator binary.
- What got in the way
- Ordering, retry backoff and dead-letter behavior are set on the subscription, not in code, so they had to be written up as setup steps for deployment.
