Not sure of the celery underpinnings for specifying persistent messages, perhaps it&#39;s documented, but you need to set the message delivery_mode = 2 in the message properties when calling Basic.Publish.<br><br><div class="gmail_quote">

On Fri, Feb 18, 2011 at 4:19 PM, hekevintran <span dir="ltr">&lt;<a href="mailto:hekevintran@gmail.com">hekevintran@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

I am using RabbitMQ with Django through Celery. I am using the most<br>
basic setup:<br>
<br>
 � �# RabbitMQ connection settings<br>
 � �BROKER_HOST = &#39;localhost&#39;<br>
 � �BROKER_PORT = &#39;5672&#39;<br>
 � �BROKER_USER = &#39;guest&#39;<br>
 � �BROKER_PASSWORD = &#39;guest&#39;<br>
 � �BROKER_VHOST = &#39;/&#39;<br>
<br>
I imported a Celery task and queued it to run one year later. From the<br>
iPython shell:<br>
<br>
 � �In [1]: from apps.test_app.tasks import add<br>
<br>
 � �In [2]: dt=datetime.datetime(2012, 2, 18, 10, 00)<br>
<br>
 � �In [3]: add.apply_async((10, 6), eta=dt)<br>
 � �DEBUG:amqplib:Start from server, version: 8.0, properties:<br>
{u&#39;information&#39;: &#39;Licensed under the MPL. �See <a href="http://www.rabbitmq.com/" target="_blank">http://www.rabbitmq.com/</a>&#39;,<br>
u&#39;product&#39;: &#39;RabbitMQ&#39;, u&#39;version&#39;: &#39;2.2.0&#39;, u&#39;copyright&#39;: &#39;Copyright<br>
(C) 2007-2010 LShift Ltd., Cohesive Financial Technologies LLC., and<br>
Rabbit Technologies Ltd.&#39;, u&#39;platform&#39;: &#39;Erlang/OTP&#39;}, mechanisms:<br>
[&#39;PLAIN&#39;, &#39;AMQPLAIN&#39;], locales: [&#39;en_US&#39;]<br>
 � �DEBUG:amqplib:Open OK! known_hosts []<br>
 � �DEBUG:amqplib:using channel_id: 1<br>
 � �DEBUG:amqplib:Channel open<br>
 � �DEBUG:amqplib:Closed channel #1<br>
 � �Out[3]: &lt;AsyncResult: cfc507a1-175f-438e-acea-8c989a120ab3&gt;<br>
<br>
RabbitMQ received this message in the celery queue:<br>
<br>
 � �$ �rabbitmqctl list_queues name messages durable<br>
 � �Listing queues ...<br>
 � �KTMacBook.local.celeryd.pidbox � � �0 � � � false<br>
 � �celery � � �1 � � � true<br>
 � �celeryctl_KTMacBook.local � 0 � � � true<br>
 � �...done.<br>
<br>
I then killed RabbitMQ by hitting control-C followed by &#39;a&#39; to abort.<br>
When I start the server again and check it with rabbitmqctl, it says<br>
that there are no messages in the celery queue:<br>
<br>
 � �$ �rabbitmqctl list_queues name messages durable<br>
 � �Listing queues ...<br>
 � �celery � � �0 � � � true<br>
 � �celeryctl_KTMacBook.local � 0 � � � true<br>
 � �...done.<br>
<br>
The celery queue was durable. Why were the messages not persisted?<br>
What do I need to do to make the messages persistent?<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>