Limit Log Entries sent GCP PubSub

Hi everyone,
I have Grafana Agent running on GCP Cloud Run and consuming logs via a push-subscription on a PubSub Topic. It then pushes the logs to Loki in grafana cloud. In the event that Loki would not be available I would like Agent to stop accepting logs from the PubSub topic so that they can be consumed once Loki is available again. Is there some limit that I can set, so that the Agent stops accepting messages from PubSub? Otherwise the logs would be lost and disk would run full I think.