Package io.micronaut.gcp.pubsub.support
Class PubSubTopicUtils
- java.lang.Object
-
- io.micronaut.gcp.pubsub.support.PubSubTopicUtils
-
public final class PubSubTopicUtils extends java.lang.Object
Various utility methods for dealing with Pub/Sub topics. Original source at : https://github.com/spring-cloud/spring-cloud-gcp/blob/master/spring-cloud-gcp-pubsub/src/main/java/org/springframework/cloud/gcp/pubsub/support/PubSubTopicUtils.java- Since:
- 2.0.0
- Author:
- Mike Eltsufin, Vinicius Carvalho
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static com.google.pubsub.v1.ProjectTopicName
toProjectTopicName(java.lang.String topic, java.lang.String projectId)
Create aProjectTopicName
based on a topic name within a project or the fully-qualified topic name.
-
-
-
Method Detail
-
toProjectTopicName
public static com.google.pubsub.v1.ProjectTopicName toProjectTopicName(@Nonnull java.lang.String topic, @Nonnull java.lang.String projectId)
Create aProjectTopicName
based on a topic name within a project or the fully-qualified topic name. If the specified topic is in theprojects/<project_name>/topics/<topic_name>
format, then theprojectId
is ignored}- Parameters:
topic
- the topic name in the project or the fully-qualified project nameprojectId
- the project ID to use if the topic is not a fully-qualified name- Returns:
- the Pub/Sub object representing the topic name
-
-