'Micronaut GCP global pubsub endpoint
I've searched the Micronaut docs for a solution how to define GCP topic endpoint globally, but with no luck. Right now, I'll have to do the below config in every publisher.
Any advice will be highly appreciated.
Environment: Micronaut 3.4.2
@PubSubClient
interface SnapshotPublisher {
@Topic(value = "\${gcp.snapshot-topic}", endpoint = "\${gcp.pubsub.endpoint}")
fun send(snapshotJson: String): Mono<String>
}
Solution 1:[1]
As of now there are no ways to specify the endpoint which topics should publish to globally. See https://github.com/micronaut-projects/micronaut-gcp/blob/df60adbb8f4fd00fb6be2afc4d3146b71bf99425/gcp-pubsub/src/main/java/io/micronaut/gcp/pubsub/intercept/PubSubClientIntroductionAdvice.java#L106 .
This PR should fix the issue, if it gets merged: https://github.com/micronaut-projects/micronaut-gcp/pull/635
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | johnk |