Declaring queue properly, but now it would appear we're blocking...

cat-town
Dan Buch 12 years ago
parent ce29df17cb
commit dda8e8cb85

@ -1,6 +1,6 @@
import com.rabbitmq.client._ import com.rabbitmq.client._
object Producer extends App { object HelloWorldProducer extends App {
if (args.length < 1) { if (args.length < 1) {
println("You must provide a message argument") println("You must provide a message argument")
} else { } else {
@ -12,7 +12,7 @@ object Producer extends App {
var channel = connection.createChannel() var channel = connection.createChannel()
channel.exchangeDeclare("hello-exchange", "direct", true) channel.exchangeDeclare("hello-exchange", "direct", true)
channel.queueDeclare("hello-queue", true, false, false, null) channel.queueDeclare("hello-queue", false, false, false, null)
println("Publishing ", messageBody) println("Publishing ", messageBody)
channel.basicPublish("hello-exchange", "hola", null, channel.basicPublish("hello-exchange", "hola", null,

Loading…
Cancel
Save