Reputation: 10679
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>
}
Upvotes: 0
Views: 163
Reputation: 108
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
Upvotes: 1