node-amqp icon indicating copy to clipboard operation
node-amqp copied to clipboard

How to check if a queue already exists or not ?

Open m2omou opened this issue 9 years ago • 2 comments

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

Thanks

m2omou avatar Jul 22 '15 16:07 m2omou

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.

PritamUpadhyay avatar Jul 23 '15 04:07 PritamUpadhyay

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

m2omou avatar Aug 13 '15 23:08 m2omou