Skip to content

Latest commit

 

History

History
62 lines (51 loc) · 2.17 KB

File metadata and controls

62 lines (51 loc) · 2.17 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 'google/cloud-sdk:375.0.0')

Google cloud sdk docker image does not support ARM

  • 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)

  • embedded.toxiproxy.proxies.google.pubsub.enabled Enables both creation of the container with ToxiProxy TCP proxy and a proxy to the embedded-google-pubsub container.

  • 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
     embedded.google.pubsub.topics-and-subscriptions[1].dead-letter.topic=topic0_name
     embedded.google.pubsub.topics-and-subscriptions[1].dead-letter.max-attempts=5

Produces

  • embedded.google.pubsub.host

  • embedded.google.pubsub.port

  • embedded.google.pubsub.project-id

  • embedded.google.pubsub.toxiproxy.host

  • embedded.google.pubsub.toxiproxy.port

  • embedded.google.pubsub.networkAlias

  • embedded.google.pubsub.internalPort

  • Bean ToxiproxyContainer.ContainerProxy googlePubSubContainerProxy

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}