rebus-org / Rebus.RabbitMq

:bus: RabbitMQ transport for Rebus
https://mookid.dk/category/rebus
Other
63 stars 44 forks source link

Check if RabbitMq queue exists before creating it #50

Closed pravinkarthy closed 5 years ago

pravinkarthy commented 5 years ago

Hi @mookid8000 ,

Am using two RabbitMQTransport objects, one as one-way sender and another as receiver queue. (1) Is it possible to check if the receiver queue exists using the "queuename" before creating it. (2) Also, wanted to check if its possible to selectively delete a message from rabbitmq by fetching the transportMessage object based on MessageID or any other attribute ?

Thanks.

mookid8000 commented 5 years ago

1) Rebus does that for you – it uses the QueueDeclarePassive command the first time it sees a new destination queue, so it will fail if you try to send to a non-existent queue.

2) I don't think that's possible. As far as I know, RabbitMQ only provides the ability to dequeue the next message.

pravinkarthy commented 5 years ago

thanks a lot !