jeudi 25 mars 2021

Wait for messages to be ack'd when using Google Pubsub emulator?

Commonly when using Google Pubsub in my code, I will have some process which listens to messages on a subscription and, for each message, performs some action and acks the message. I test such code locally using Google's Pubsub emulator. In such a test environment, it would be incredibly useful after sending a message to a topic to be able to wait for that message to be ack'd on all subscription(s) before continuing the test. Also, before shutting down the test it would be useful to have an "assert no work" sanity check to confirm that there are no un-acked messages in-flight. Is such a feature built in to the Pubsub emulator or possible with some workaround?

Aucun commentaire:

Enregistrer un commentaire