[rabbitmq-discuss] test of a existing queue
Gary Russell
grussell at vmware.com
Fri Feb 22 16:22:54 GMT 2013
channel.queueDeclarePassive(queueName) will throw an exception if the queue doesn't exist.
You can get a channel by
Channel channel = factory.createConnection().createChannel(false);
where factory is a reference to the CachingConnectionFactory.
No, you can't specify the queue name in the send methods - you don't send to a queue, you send to an exchange, and it routes it to the queue.
----- Original Message -----
From: "Cyril LECLERC" <Cyril.LECLERC at pragmaconsult.lu>
To: "Discussions about RabbitMQ" <rabbitmq-discuss at lists.rabbitmq.com>
Sent: Friday, February 22, 2013 10:54:53 AM
Subject: [rabbitmq-discuss] test of a existing queue
Hello,
How we can test if a queue exits in application? Without the queueDeclare because it is not what i want, indeed, if i use amqpTemplate.convertAndSend(), and the queue does'nt existing, nothing will happen, but i have to know if the queue configured is existing, but not create it...because we use spring amqp.
Moreover how we can configure the name of the queue in this method (amqpTemplate.convertAndSend()) because it takes one string argument but when it is configured in spring i don't have to configure in the code i want to use spring configuration ...
thanks....
Cyril
_______________________________________________
rabbitmq-discuss mailing list
rabbitmq-discuss at lists.rabbitmq.com
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
More information about the rabbitmq-discuss
mailing list