<div dir="ltr"><span class="Apple-style-span" style="border-collapse: collapse; ">hi,<div><br></div><div>i have somehow clumsy fingers. i try to get a test script working that uses the erlang rpc client and lib_amqp but i fail miserably. is there somewhere a short snippet that actually uses those two libs to post messages to rabbit? my (very short) test thingy looks currently like that (many iterations old though)</div>
<div><br></div><div>---------------------8&lt;------------------</div><div><br></div><div><div>-module(test).</div><div><br></div><div>-include_lib(&quot;rabbitmq_server/include/rabbit_framing.hrl&quot;).</div><div>-include_lib(&quot;rabbitmq_server/include/rabbit.hrl&quot;).</div>
<div>-include(&quot;include/amqp_client.hrl&quot;).</div><div><br></div><div>-export([channel/0, broker/0, start/0]).</div><div><br></div><div>channel() -&gt;</div><div>&nbsp;&nbsp; &nbsp;C=lib_amqp:start_connection(&quot;localhost&quot;),</div>
<div>&nbsp;&nbsp; &nbsp;Channel=lib_amqp:start_channel(C),</div><div>&nbsp;&nbsp; &nbsp;{ok, Channel}.</div><div><br></div><div>broker ()-&gt;</div><div>&nbsp;&nbsp; &nbsp;{ok, Channel} = channel(),</div><div>&nbsp;&nbsp; &nbsp;Broker = #broker_config{channel_pid = Channel},</div>
<div>&nbsp;&nbsp; &nbsp;{ok, Broker}.</div><div><br></div><div>start() -&gt;</div><div>&nbsp;&nbsp; &nbsp;{ok, Broker} = broker(),</div><div>&nbsp;&nbsp; &nbsp;amqp_rpc_client:start(Broker, &lt;&lt;&quot;Hessian&quot;&gt;&gt;).</div><div><br></div><div><div>---------------------&gt;8------------------</div>
<div><br></div><div>thanks for all hints in the right direction :-)</div><div><br></div><div>cheers</div><div>lenz</div></div></div></span></div>