[rabbitmq-discuss] queueDeclarePassive Shutting down the channel

Max Bridgewater max.bridgewater at gmail.com
Sun Feb 13 01:30:48 GMT 2011


Hi,

I'm using the Java client and I notice that  queueDeclarePassive()
shuts down the channel if no queue exists with the specified name. I'm
not sure if I'm doing something wrong or this is how this is supposed
to behave. Here is my code; please advise.

public class QueuePassiveDeclare {
	
	public static void main(String[] argv) throws Exception {
		String host = "localhost";
		String vhost = "MyVHost";
		String user = "guest";
		String name = "myQueue";

		ConnectionFactory factory = new ConnectionFactory();
		factory.setHost(host);
		factory.setPassword(user);
		factory.setUsername(user);
		factory.setVirtualHost(vhost);
		Connection conn = factory.newConnection();
		Channel chan = conn.createChannel();
		chan.queueDeclarePassive(name);

	}
}

Thanks,
Max.


More information about the rabbitmq-discuss mailing list