[rabbitmq-discuss] Send durable messages
Alvaro Videla
videlalvaro at gmail.com
Thu Dec 12 09:17:34 GMT 2013
You can find all the tutorials ported to Erlang in that URL.
While not ideal, most RabbitMQ plugins, like shovel or federation, use the
Erlang client.
Regards,
Alvaro
On Thursday, December 12, 2013, Kaveh Shahbazian wrote:
> Many thanks to you! That worked! Of-course it's strange why there is so
> little Erlang samples for RabbitMQ! :)
>
> Kaveh Shahbazian
> "Walking on water and developing software from a specification are easy if
> both are frozen."
> -- Edward Berard
> <http://goo.gl/ZZ2TMu>
> <http://stackoverflow.com/users/54467/kaveh-shahbazian>
>
>
> On Thu, Dec 12, 2013 at 1:51 AM, Alvaro Videla <videlalvaro at gmail.com<javascript:_e({}, 'cvml', 'videlalvaro at gmail.com');>
> > wrote:
>
>> Hi,
>>
>> You need to set the delivery_mode = 2
>>
>> See
>> https://github.com/rabbitmq/rabbitmq-tutorials/blob/master/erlang/new_task.erl#L22
>>
>> Regards,
>>
>> Alvaro
>>
>> On Wed, Dec 11, 2013 at 8:54 PM, Kaveh Shahbazian
>> <kaveh.shahbazian at gmail.com <javascript:_e({}, 'cvml',
>> 'kaveh.shahbazian at gmail.com');>> wrote:
>> > 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}),
>> > amqp_channel:cast(Channel,
>> > #'basic.publish'{
>> > exchange = <<"">>,
>> > routing_key = <<"q1_queue">>
>> > },
>> > #amqp_msg{
>> > payload = <<"Hello World!">>
>> > }),
>> > io:format(" [x] Sent 'Hello World!'~n"),
>> > ok = amqp_channel:close(Channel),
>> > ok = amqp_connection:close(Connection),
>> > ok.
>> >
>> > Thanks;
>> >
>> > _______________________________________________
>> > rabbitmq-discuss mailing list
>> > rabbitmq-discuss at lists.rabbitmq.com <javascript:_e({}, 'cvml',
>> 'rabbitmq-discuss at lists.rabbitmq.com');>
>> > https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>> >
>> _______________________________________________
>> rabbitmq-discuss mailing list
>> rabbitmq-discuss at lists.rabbitmq.com <javascript:_e({}, 'cvml',
>> 'rabbitmq-discuss at lists.rabbitmq.com');>
>> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20131212/b7714cb8/attachment.html>
More information about the rabbitmq-discuss
mailing list