1

Every time I restart the PubSub emulator, the topics/subscriptions are gone. Currently, I have a script that creates the topics and subscriptions each time the emulator starts:

https://stackoverflow.com/a/56994166/1237919

Is this state not persisted? Is there a way to persist state?

Touko
  • 11,359
  • 16
  • 75
  • 105
jacob
  • 2,762
  • 1
  • 20
  • 49

1 Answers1

4

The emulator runs in memory; state is not persisted across runs. If you want to persist state, you will need to use the real Cloud Pub/Sub service. You could instead re-create your topics and subscriptions each time you start the emulator to get to the desired starting state.

Lauren
  • 844
  • 4
  • 8