RabbitMq error while calling exchangeBind -
i have simple scenario. create queue, exchange , bind queue exchange.
code : string queuename = new stringbuilder("lp.data.").append("testaccount").append(".").append("sublp").tostring(); channel.exchangedeclare(exchangeconstants.data_excg, "direct", true); channel.queuedeclare(queuename, true, false, false, null); channel.exchangebind(queuename, exchangeconstants.data_excg, queuename); following error when exchangebind() called. com.rabbitmq.client.shutdownsignalexception: channel error; reason: {#method<channel.close>(reply-code=404, reply-text=not_found - no exchange 'lp.data.testaccount.sublp' in vhost '/', class-id=40, method-id=30), null, ""} exchangeconstants.data_excg "data_excg". using rabbitmq admin see exchange , queue created. exception don't understand why looking exchange name "lp.data.testaccount.sublp", queuename. seems quite trivial, sure missing something. using java rabbitmq-client version 3.04.
channel.exchangebind(java.lang.string destination, java.lang.string source, java.lang.string routingkey)
this function bind 2 exchange together: destination , source both supposed exchanges.
here, should use channel.queuebind
instead.
Comments
Post a Comment