Skip to content
/ hive Public

Playground around GCP Pub/Sub service emulator.

Notifications You must be signed in to change notification settings

thegrego/hive

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Running

  1. Start Pub/Sub locally. For this you must have gcloud installed locally. This will start Pub/Sub on port 8085 and create project with id hive.:

gcloud beta emulators pubsub start --project=hive

  1. Create topics and push-subscriptions by running Preparation.scala:

sbt runMain org.grego.hive.util.Preparation

  1. Run all components separately:

sbt "runMain org.grego.hive.configuration.Configuration"

sbt "runMain org.grego.hive.admiral.Admiral"

sbt "runMain org.grego.hive.fighting.Fighting"

sbt "runMain org.grego.hive.supplier.FoodSupplier"

sbt "runMain org.grego.hive.gateway.Gateway"

  1. Send a "start fight" to pub/sub using StartFight.scala:

sbt "runMain org.grego.hive.util.StartFight"

Notes:

  • It is possible to run Pub/Sub in docker. However, for this we need to give docker possibility to call our component endpoints, which are deployed on OS level.
  • Pub/Sub emulator is not persistent so every time you restart it you have to run Preparation
  • Config.scala should be replaced by proper configuration
  • Multiple dependencies will cause sporadic failures because FileStorage is not thread safe and the whole state is overridden from outside

About

Playground around GCP Pub/Sub service emulator.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages