<div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif">Many thanks to you! That worked! Of-course it's strange why there is so little Erlang samples for RabbitMQ! :)</div></div><div class="gmail_extra">
<br clear="all"><div><div dir="ltr"><div><span style="font-family:tahoma,sans-serif;font-size:large">Kaveh Shahbazian</span><br></div><div><font size="1" face="arial narrow, sans-serif"><div>“Walking on water and developing software from a specification are easy if both are frozen.” </div>
<div>― Edward Berard</div><div><a href="http://goo.gl/ZZ2TMu" target="_blank"><img src="http://www.linkedin.com/img/webpromo/btn_myprofile_160x33.png"></a><br></div><div><a href="http://stackoverflow.com/users/54467/kaveh-shahbazian" target="_blank"><img src="http://stackoverflow.com/users/flair/54467.png"></a><br>
</div></font></div></div></div>
<br><br><div class="gmail_quote">On Thu, Dec 12, 2013 at 1:51 AM, Alvaro Videla <span dir="ltr"><<a href="mailto:videlalvaro@gmail.com" target="_blank">videlalvaro@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<br>
You need to set the delivery_mode = 2<br>
<br>
See <a href="https://github.com/rabbitmq/rabbitmq-tutorials/blob/master/erlang/new_task.erl#L22" target="_blank">https://github.com/rabbitmq/rabbitmq-tutorials/blob/master/erlang/new_task.erl#L22</a><br>
<br>
Regards,<br>
<br>
Alvaro<br>
<div><div class="h5"><br>
On Wed, Dec 11, 2013 at 8:54 PM, Kaveh Shahbazian<br>
<<a href="mailto:kaveh.shahbazian@gmail.com">kaveh.shahbazian@gmail.com</a>> wrote:<br>
> Hi, I want to send durable messages. But when I add 'durable = true' in<br>
> publish or message it complains that there is no such field in that record.<br>
><br>
> here is my code:<br>
><br>
> send() -><br>
>     {ok, Connection} = amqp_connection:start(#amqp_params_network{ host =<br>
> "localhost" }),<br>
>     {ok, Channel} = amqp_connection:open_channel(Connection),<br>
><br>
>     amqp_channel:call(Channel, #'queue.declare'{queue = <<"q1_queue">>,<br>
> durable = true}),<br>
>     amqp_channel:cast(Channel,<br>
>                       #'basic.publish'{<br>
> exchange = <<"">>,<br>
> routing_key = <<"q1_queue">><br>
> },<br>
>                       #amqp_msg{<br>
> payload = <<"Hello World!">><br>
> }),<br>
>     io:format(" [x] Sent 'Hello World!'~n"),<br>
>     ok = amqp_channel:close(Channel),<br>
>     ok = amqp_connection:close(Connection),<br>
>     ok.<br>
><br>
> Thanks;<br>
><br>
</div></div>> _______________________________________________<br>
> rabbitmq-discuss mailing list<br>
> <a href="mailto:rabbitmq-discuss@lists.rabbitmq.com">rabbitmq-discuss@lists.rabbitmq.com</a><br>
> <a href="https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss" target="_blank">https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss</a><br>
><br>
_______________________________________________<br>
rabbitmq-discuss mailing list<br>
<a href="mailto:rabbitmq-discuss@lists.rabbitmq.com">rabbitmq-discuss@lists.rabbitmq.com</a><br>
<a href="https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss" target="_blank">https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss</a><br>
</blockquote></div><br></div>