Skip to content

Latest commit

 

History

History
48 lines (39 loc) · 1.57 KB

File metadata and controls

48 lines (39 loc) · 1.57 KB

embedded-google-pubsub

Maven dependency

pom.xml
<dependency>
    <groupId>com.playtika.testcontainers</groupId>
    <artifactId>embedded-google-pubsub</artifactId>
    <scope>test</scope>
</dependency>

Consumes (via bootstrap.properties)

  • embedded.google.pubsub.enabled (true|false, default is 'true')

  • embedded.google.pubsub.reuseContainer (true|false, default is 'false')

  • embedded.google.pubsub.dockerImage (default is set to 'google/cloud-sdk:257.0.0')

  • embedded.google.pubsub.host (default is 0.0.0.0)

  • embedded.google.pubsub.port (default is 8089)

  • embedded.google.pubsub.project-id (default is my-project-id)

  • Topics and subscriptions:

     embedded.google.pubsub.topics-and-subscriptions[0].topic=topic0_name
     embedded.google.pubsub.topics-and-subscriptions[0].subscription=subscription0_name
     embedded.google.pubsub.topics-and-subscriptions[1].topic=topic0_name
     embedded.google.pubsub.topics-and-subscriptions[1].subscription=subscription0_name

Produces

  • embedded.google.pubsub.host

  • embedded.google.pubsub.port

  • embedded.google.pubsub.project-id

Example

To auto-configure spring-cloud-gcp-starter-pubsub use these properties in your test application.properties:

/src/test/resources/application.properties
spring.cloud.gcp.project-id=${embedded.google.pubsub.project-id}
spring.cloud.gcp.pubsub.emulatorHost=${embedded.google.pubsub.host}:${embedded.google.pubsub.port}