<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<------------------</div><div><br></div><div><div>-module(test).</div><div><br></div><div>-include_lib("rabbitmq_server/include/rabbit_framing.hrl").</div><div>-include_lib("rabbitmq_server/include/rabbit.hrl").</div>
<div>-include("include/amqp_client.hrl").</div><div><br></div><div>-export([channel/0, broker/0, start/0]).</div><div><br></div><div>channel() -></div><div> C=lib_amqp:start_connection("localhost"),</div>
<div> Channel=lib_amqp:start_channel(C),</div><div> {ok, Channel}.</div><div><br></div><div>broker ()-></div><div> {ok, Channel} = channel(),</div><div> Broker = #broker_config{channel_pid = Channel},</div>
<div> {ok, Broker}.</div><div><br></div><div>start() -></div><div> {ok, Broker} = broker(),</div><div> amqp_rpc_client:start(Broker, <<"Hessian">>).</div><div><br></div><div><div>--------------------->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>