Skip to content

How to check if queue exists? #1130

Closed Answered by lukebakken
ZedZipDev asked this question in Q&A
Discussion options

You must be logged in to vote

For example, a client app connects to RabbitMQ Server and it needs to check if queue exists before create it

Your application should just create the queue using identical creation parameters. If it already exists, nothing will happen.

If you need to check if a queue exists, use a passive declaration. See the passive parameter:

https://github.com/rabbitmq/rabbitmq-dotnet-client/blob/main/projects/RabbitMQ.Client/client/framing/QueueDeclare.cs#L52

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by lukebakken
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants