SpinGo / op-rabbit

The Opinionated RabbitMQ Library for Scala and Akka
Other
232 stars 73 forks source link

Exemplify how to provide config at runtime #163

Closed zanella closed 5 years ago

zanella commented 5 years ago

Hi, I'm running my RabbitMQ on random ports (integration tests), as such I've no idea which port I'm getting, might be a good idea to add an example to the docs, e.g.:

` import com.spingo.op_rabbit.RabbitControl import akka.actor.{ActorSystem, Props}

implicit val actorSystem = ActorSystem("such-system") val rabbitControl = actorSystem.actorOf(Props[RabbitControl])

// In case you override some config at runtime you can create it manually: // val props = Props(classOf[RabbitControl], Left(ConnectionParams.fromConfig(configuration get[Config] "op-rabbit.connection"))) // val rabbitControl = actorSystem actorOf props `

Thanks for the lib!

zanella commented 5 years ago

The cookbook entries should take care of it, overlooked it -> https://github.com/SpinGo/op-rabbit/wiki/Cookbook