-
Notifications
You must be signed in to change notification settings - Fork 36
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
Support for GCP PubSub Push Subscriptions #1012
Conversation
I've got to make some minor changes to one of the tests because it keeps failing (only) in CI, but this is otherwise ready for review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you address the low code coverage detected by sonar and other issues?
Should probably bump the version to 5.4.0-SNAPSHOT in gradle.properties (as these changes are for 5.4.0) |
gcp-pubsub/src/main/java/io/micronaut/gcp/pubsub/intercept/PubSubPushConsumerAdvice.java
Outdated
Show resolved
Hide resolved
gcp-pubsub/src/main/java/io/micronaut/gcp/pubsub/push/PushController.java
Outdated
Show resolved
Hide resolved
gcp-pubsub/src/test/groovy/io/micronaut/gcp/pubsub/bind/PubSubPushSpec.groovy
Show resolved
Hide resolved
gcp-pubsub/src/test/groovy/io/micronaut/gcp/pubsub/bind/PubSubPushSpec.groovy
Show resolved
Hide resolved
gcp-pubsub/src/test/groovy/io/micronaut/gcp/pubsub/bind/PubSubPushSpec.groovy
Show resolved
Hide resolved
gcp-pubsub/src/test/groovy/io/micronaut/gcp/pubsub/bind/PubSubPushSpec.groovy
Outdated
Show resolved
Hide resolved
Co-authored-by: Tim Yates <tim.yates@gmail.com>
gcp-pubsub/src/main/java/io/micronaut/gcp/pubsub/annotation/PushSubscription.java
Show resolved
Hide resolved
Co-authored-by: Tim Yates <tim.yates@gmail.com>
- Replace writeValueAsString#getBytes with writeValueAsBytes - Inject JsonMapper instead of JsonMapper.createDefault()
gcp-pubsub/src/main/java/io/micronaut/gcp/pubsub/validation/PushMessageValidator.java
Outdated
Show resolved
Hide resolved
gcp-pubsub/src/main/java/io/micronaut/gcp/pubsub/push/PushSubscriberHandler.java
Outdated
Show resolved
Hide resolved
@graemerocher @dstepanov please check this PR and see if you are ok with the usage of We played with this idea in security but we went a different direction. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, very nicely crafted PR 👍
gcp-pubsub/src/main/java/io/micronaut/gcp/pubsub/validation/PushMessageValidator.java
Show resolved
Hide resolved
...b/src/main/java/io/micronaut/gcp/pubsub/intercept/AbstractPubSubConsumerMethodProcessor.java
Outdated
Show resolved
Hide resolved
gcp-pubsub/src/main/java/io/micronaut/gcp/pubsub/push/DefaultPushSubscriberHandler.java
Outdated
Show resolved
Hide resolved
Quality Gate passedThe SonarCloud Quality Gate passed, but some issues were introduced. 9 New issues |
Support is added for GCP PubSub Push subscriptions.
Push subscription messages may be handled by methods annotated with the new
@PushSubscription
annotation.Push messages are sent to the application via HTTP request from the PubSub service.
Beyond the different infrastructure used to ingest the messages, care has been taken to keep the semantics of
@Subscription
and@PushSubscription
methods nearly identical.Closes #946