Hi,

I would want to ask you how can you check if an exchange exists using the
java client api. I know ho to check if a queue exists before trying to
declare it (using queueDeclarePasive) but i don't know / understand how to
do it with the exchanges (using exchangeDeclarePasive). Thanks,

--
View this message in context: http://old.nabble.com/How-to-check-if-an-exchange-exists-tp29152140p29152140.html
Sent from the RabbitMQ mailing list archive at Nabble.com.

Search Discussions

  • Simon MacMullen at Jul 14, 2010 at 9:38 am

    On 13/07/10 16:40, alcalino wrote:
    I would want to ask you how can you check if an exchange exists using the
    java client api. I know ho to check if a queue exists before trying to
    declare it (using queueDeclarePasive) but i don't know / understand how to
    do it with the exchanges (using exchangeDeclarePasive). Thanks,
    Hi Francisco. exchangeDeclarePassive should work exactly like
    queueDeclarePassive - i.e. either succeeds or closes the channel.

    If you just want to ensure the exchange exists before publishing to it,
    you should actively declare it - that's idempotent so you don't need to
    worry about doing it more than once.

    Cheers, Simon

    --
    Simon MacMullen
    Staff Engineer, RabbitMQ
    SpringSource, a division of VMware

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouprabbitmq-discuss @
categoriesrabbitmq
postedJul 13, '10 at 3:40p
activeJul 14, '10 at 9:38a
posts2
users2
websiterabbitmq.com
irc#rabbitmq

2 users in discussion

Simon MacMullen: 1 post Alcalino: 1 post

People

Translate

site design / logo © 2021 Grokbase