Google Pub/Sub Subscriber not receiving messages after a while

前端 未结 3 1912
孤独总比滥情好
孤独总比滥情好 2021-01-21 17:54

I have a simple python script that uses Google pubsub to detect new files in the google cloud storage. The script simply adds new messages to a queue where another thread proces

3条回答
  •  有刺的猬
    2021-01-21 18:36

    I got stuck 1 hour on this problem, so this is how I fixed my problem :

    The GOOGLE_APPLICATION_CREDENTIALS environment variable was setup to a different service account, who wasn't on the right project

    project_id = "my_project_sandbox" 
    

    And

    my_project.json (service account used by project)

    {
      "type": "service_account",
      "project_id": "my_project_prod",
      "private_key_id": "---",
      "private_key": "---",
      ...
    }
    

提交回复
热议问题