postwait / node-amqp

[UNMAINTAINED] node-amqp is an AMQP client for nodejs
MIT License
1.69k stars 357 forks source link

How to check if a queue already exists or not ? #401

Open m2omou opened 9 years ago

m2omou commented 9 years ago

Is it possible, using the nodejs rabbitmq client to know if a queue already exist before trying to create it ?

Thanks

PritamUpadhyay commented 9 years ago

Please read README here

connection.queue(name[, options][, openCallback])

passive: boolean, default false. If set, the server will not create the queue. The client can use this to check whether a queue exists without modifying the server state.

m2omou commented 8 years ago

Yes I have read the readme, but that doesn't really help me, do you have any piece of code to explain it ?

That would be helpful thank you