<dependency>
<groupId>com.playtika.testcontainers</groupId>
<artifactId>embedded-google-pubsub</artifactId>
<scope>test</scope>
</dependency>-
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')-
Image versions on dockerhub
-
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.enabledEnables both creation of the container with ToxiProxy TCP proxy and a proxy to theembedded-google-pubsubcontainer. -
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
-
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
To auto-configure spring-cloud-gcp-starter-pubsub use these properties in your test 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}