-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use rele without creating a subscription #224
Comments
In theory this should work without issue according to this https://github.com/mercadona/rele/blob/master/rele/client.py#L62 Have you tried it already? |
Ah right, having thought about this for aa few minutes, this makes perfect sense. The reason we create a subscription is due to when the worker spin ups the first time and the subscription is not there, we create one. On any subsequent start of the worker, the subscription registered in GCP will be there. Meaning that we dont create a subscription hence the suppression linked above. So to further answer your question, you creating a subscription with Terraform should be no issue. Just make sure your subscription/topic names match up and you should be good. |
Thanks for the prompt reply! I'm going to be working on this next sprint and will check back in once I try out your suggestion |
@daniel-ruiz this issue can be closed 😉 |
Looking through the documentation and the code, this library creates a new subscription on the PubSub topic specified in the
sub
decorator.I'm looking to separate code that creates infrastructure from code that processes subscriber messages. Ideally, my subscribers would be created in Terraform along with the retry / dead letter topic config for each subscriber. I'm also hesitant to provide my subscribers with additional permissions beyond reading and acknowledging messages for a given set of subscriptions
Is it possible to use rele without creating a subscription? If not, is this a feature you would accept a PR for?
The text was updated successfully, but these errors were encountered: