On 05/03/2008, Gordon Sim <[EMAIL PROTECTED]> wrote: > Carl Trieloff wrote: > > the store is a module that the daemon loads. For M2 which is AMQP 0-8 > > here are notes http://cwiki.apache.org/qpid/getting-started-guide.html > > > More specifically: http://cwiki.apache.org/qpid/3rd-party-libraries.html > > > > in terms of python code fragment to set durability for 0-8 I will let > > someone that know what the best example is comment > > > Something like the following will work for 0-8: > > #make the queue durable: > channel.queue_declare(queue="myqueue", durable=True) > > #mark the published message as durable (delivery-mode=2, > #where 2 implies durability): > > channel.basic_publish(routing_key="myqueue", > content=Content("MyMessage", properties={'delivery_mode':2}))
IIRC on M2 the delivery mode property is 'delivery mode' note the lack of '_'. > A durable message enqueued on a durable queue will survive even if the > broker goes down. > > (Note, If you create exchanges other than the standard ones - > amq.direct, amq.topic etc) you can specify durable=true to them also. > That way the bindings to durable queues will be restored on recovery. > The standard exchanges are all durable by default.) > -- Martin Ritchie
