<div class="post-text" style="margin-right: 5px; margin-bottom: 5px; font-size: 14px; width: 660px; line-height: 18px; color: rgb(0, 0, 0); font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; "><p style="font-size: 14px; background-color: transparent; clear: both; word-wrap: break-word; ">I found error myself.</p><p style="font-size: 14px; background-color: transparent; clear: both; word-wrap: break-word; ">amqp_channel:call(Channel, #'basic.publish'{<strong style="background-color: transparent; ">exchange= ExchangeName</strong>,routing_key = Key}, #amqp_msg{props = #'P_basic'{delivery_mode=2}, payload = Msg})</p></div><br class="Apple-interchange-newline">Thanks,<br>On Tuesday, August 28, 2012 2:57:40 PM UTC+4, Andrey Kolchanov wrote:<blockquote class="gmail_quote" style="margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">Hello,<div>I have a topic exchange in my test environment.</div><div>I've add some binding to this exchange in web management console.When I publish a test message with proper routing key via web management console this message successfully delivered to desired queue.</div><div>I'm trying to publish message through erlang client, but message is not delivering to queue. <br>What is wrong with my code:<br><br><pre style="margin-bottom:10px;padding:5px;font-size:14px;background-color:rgb(238,238,238);font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,serif;overflow:auto;width:auto;max-height:600px;color:rgb(0,0,0);line-height:18px"><code style="font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,serif">ExchangeName = <<"custom.topic">>,
ExchangeType = <<"topic">>,
Key = <<"K">>,
Msg = <<"123">>,
{ok, Connection} = amqp_connection:start
(#amqp_params_network{username = <<"guest">>, password = <<"guest">>, host = "192.168.1.1"}),
{ok, Channel} = amqp_connection:open_channel(<wbr>Connection),
#'exchange.declare_ok'{} =
amqp_channel:call(Channel, #'exchange.declare'{exchange=<wbr>ExchangeName, durable=true, type = ExchangeType}), </code></pre><div><span style="font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,serif;background-color:rgb(238,238,238);color:rgb(0,0,0);font-size:14px;line-height:18px">ok = amqp_channel:call(Channel, #'basic.publish'{routing_key = Key}, #amqp_msg{props = #'P_basic'{delivery_mode=2}, payload = Msg})</span> .</div></div></blockquote>