|
|
@ -14,9 +14,8 @@ object HelloWorldProducer extends App {
|
|
|
|
channel.exchangeDeclare("hello-exchange", "direct", true)
|
|
|
|
channel.exchangeDeclare("hello-exchange", "direct", true)
|
|
|
|
channel.queueDeclare("hello-queue", false, false, false, null)
|
|
|
|
channel.queueDeclare("hello-queue", false, false, false, null)
|
|
|
|
|
|
|
|
|
|
|
|
println("Publishing ", messageBody)
|
|
|
|
printf("Publishing '%s'\n", messageBody)
|
|
|
|
channel.basicPublish("hello-exchange", "hola", null,
|
|
|
|
channel.basicPublish("hello-exchange", "hola", null, messageBody.getBytes())
|
|
|
|
messageBody.toCharArray().map(_.toByte))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
connection.close()
|
|
|
|
connection.close()
|
|
|
|
}
|
|
|
|
}
|
|
|
|