[rabbitmq-discuss] Send durable messages

Kaveh Shahbazian kaveh.shahbazian at gmail.com
Wed Dec 11 20:54:16 GMT 2013

Hi, I want to send durable messages. But when I add 'durable = true' in
publish or message it complains that there is no such field in that record.

here is my code:

send() ->
    {ok, Connection} = amqp_connection:start(#amqp_params_network{ host =
"localhost" }),
    {ok, Channel} = amqp_connection:open_channel(Connection),

    amqp_channel:call(Channel, #'queue.declare'{queue = <<"q1_queue">>,
durable = true}),
 exchange = <<"">>,
 routing_key = <<"q1_queue">>
 payload = <<"Hello World!">>
    io:format(" [x] Sent 'Hello World!'~n"),
    ok = amqp_channel:close(Channel),
    ok = amqp_connection:close(Connection),

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20131212/ca11599f/attachment.html>

More information about the rabbitmq-discuss mailing list