[rabbitmq-discuss] question : How to not delete message from queue
Matthias Radestock
matthias at rabbitmq.com
Wed May 16 08:29:36 BST 2012
Bino,
On 16/05/12 08:18, bino oetomo wrote:
> My question is how to do something like :
> -----Start----
> def callback(ch, method, properties, body):
> print " [x] Received %r" % (body,)
> time.sleep( body.count('.') )
> isSuceed = True
> try :
> print " [x] Done"
> except :
> isSucceed = False
> if isSucceed :
> ch.basic_ack(delivery_tag = method.delivery_tag)
> else :
> #Here is my question :
> #How to keep (not deleting) the message in Queue ?
> -----Stop----
ch.basic_reject(delivery_tag = method.delivery_tag)
Matthias.
More information about the rabbitmq-discuss
mailing list