[rabbitmq-discuss] Notify when "Worker" die

Marek Majkowski majek04 at gmail.com
Fri Sep 2 10:24:18 BST 2011


On Thu, Sep 1, 2011 at 19:31, Roman Khomenko <spirt40 at gmail.com> wrote:
> I developed Work Queues like in tutorial. But I don't need to rerun task.
>
> Now my worker:
> - get TASK and TASK_ID
> - if TASK_ID in MemCache:
>     write to DB: TASK FAIL
>     basic_ack
> - else:
>    write MemCache TASK_ID
>    DO_TASK
>    basic_ack
>
> I think it's now beautiful method. Can I get "TRY COUNT" from message?

I'm not sure what you mean.

> Or can RabbitMQ send this task to another queue if first Task run died?

No, but you can look at message properties and check 'redelivery' field.
If it's set to True, it means that a message is being redelivered.
In such case you may send a copy of this message to a different queue.

Cheers,
  Marek


More information about the rabbitmq-discuss mailing list