Switching scala implementation to use env var for amqp uri

This commit is contained in:
Dan Buch 2012-11-17 08:16:21 -05:00
parent 148cf7ef95
commit 4c78d5d148
2 changed files with 2 additions and 2 deletions

View File

@ -4,7 +4,7 @@ import com.rabbitmq.client._
object HelloWorldConsumer extends App {
val factory = new ConnectionFactory()
factory.setUri("amqp://guest:guest@localhost:5672")
factory.setUri(sys.env("SYLVILAGUS_AMQP_URI"))
val connection = factory.newConnection
val channel = connection.createChannel

View File

@ -10,7 +10,7 @@ object HelloWorldProducer extends App {
var messageBody = args(0)
var factory = new ConnectionFactory()
factory.setUri("amqp://guest:guest@localhost:5672")
factory.setUri(sys.env("SYLVILAGUS_AMQP_URI"))
var connection = factory.newConnection()
var channel = connection.createChannel()