-
Notifications
You must be signed in to change notification settings - Fork 35
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
Can't get Pub/Sub subscription to initialize #459
Comments
I've added a repro from a vanilla demo project here: https://github.com/sgammon/micronaut-pubsub-repro |
@graemerocher / @viniciusccarvalho any ideas of what might be going wrong here? |
Try debug micronaut-gcp/gcp-pubsub/src/main/java/io/micronaut/gcp/pubsub/intercept/PubSubConsumerAdvice.java Line 148 in 0fe125a
|
Like @graemerocher said you can put a breakpoint there and see if it gets created. Another common issue with GCP is if you are authenticating using default credentials, Google keeps changing the IAM policies, and a bunch of services will just not work if you are not using a json credentials file and use the |
@graemerocher the breakpoint doesn't get hit @viniciusccarvalho i don't think this is related to credentials, if only because i get no errors in TRACE mode. i do however get this error:
how could that possibly be the case, though? |
Which version of Micronaut? |
And which version of Micronaut GCP? |
@graemerocher looks like it's micronaut 3.0.0, has anything changed on bean post processing? I have been AFK for a while, did not keep up, need to test the GCP support on 3.x version |
@viniciusccarvalho yes that is why I asked. For Micronaut 3.0 is currently at milestone stage, you should explicitly declare a dependency on the 4.0.0 RC1 release to get a compatible version of the GCP module https://github.com/micronaut-projects/micronaut-gcp/releases/tag/v4.0.0-RC1 |
See #448 |
Somehow the javax.inject package is missing from the depedencies: I noticed that after adding it, all gcp beans were being loaded (for instance the GoogleCredentialsFactory). You could also check that @sgammon I would follow @graemerocher advice and just change the version of your micronaut base project. Thanks @graemerocher |
@graemerocher / @viniciusccarvalho the sample is in thank you for your help both of you 😄 |
Hey there Micronaut authors,
I tried to setup a Pub/Sub subscriber in Micronaut, but I'm having trouble getting it to start up and receive a signal from the subscription. Basically, here is my code (in Kotlin):
The expectation (unless I am mistaken) is that, if
CatalogPipeline
is present in the classpath and designated via the.packages(*)
call in myApplication
, Micronaut will boot up the Pub/Sub subscription and begin calling it for signals. Is that correct, or is there more setup I need to do?I also have this in my
application.yml
:The subscription is named correctly in GCP, and the project ID matches. My local credentials are authorized to publish and subscribe to the topic/subscription.
Also, how would I go about diagnosing these issues with logging? Is there a class that I can enable logging for to see why it would, or would not, create the subscription?
The text was updated successfully, but these errors were encountered: