Switching scala implementation to use env var for amqp uri
This commit is contained in:
parent
148cf7ef95
commit
4c78d5d148
@ -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
|
||||
|
||||
|
@ -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()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user