By design, for every subscription the Google Cloud PubSub delivers messages at least once. Hence,
even if the subscriber is not present, the unacknowledged messages are stored in a persistent storage for 7 days after the messages are published.
The
documentation explains the exceptions to the "at least once delivery" approach of the Cloud PubSub and why a message would be deleted. Messages published before a subscription is created would not be retrievable. Also, a maximum retention of 7 days, after which the message would be deleted.
Hence, it is intended behavior that your Subscriber would still be able to retrieve backlogs of messages (that are under 7 days), even if it was off for some time.