[rabbitmq-discuss] amqp usage and msg ack timeout

Ben Hood 0x6e6562 at gmail.com
Thu Jul 10 20:35:29 BST 2008


Justin,

On Thu, Jul 10, 2008 at 12:04 PM, Justin Azoff <JAzoff at uamail.albany.edu> wrote:
> The wrapper automatically creates a fanout exchange called 'device_down'
> and creates a durable queue for each registered handler.
>
> So my first question is, am I correctly using rabbitmq/AMQP for this, or
> did I completely miss some built in feature that would make all of this
> much easier?

On face value I don't see any problem with this approach, but I
haven't had the time to look at your code in too much detail yet, so
this is just a preliminary response.

> I wanted each handler to be able to be restarted and never
> miss a message, and I wanted a decoupling between the process emitting
> the events and each handler.  I think durable queues and fanout
> exchanges are the proper solution for this, but I may be wrong.
>
> My second question involves a timeout for the acknowledgment of
> messages.  I noticed that if a process crashed, a message would
> automatically be put back into the queue, but if instead the process
> went into an infinite loop, the message would stay checked out
> indefinitely.  Is there a way to tell the server that if a message has
> been received, but not acked in a period of time, that it should be put
> back into the queue?

This is handled by volume and not by time. After a certain amount of
unroutable messages have queued up (because their consumption is not
ack'ed) they will be returned to the sender.

>
> I know there is also one potential issue where it may be difficult to
> manage the different exchanges and queues on the server. It would be
> nice to be able to specify that a queue is durable, but if messages are
> not consumed for a long period of time then it should be deleted.

This issue touches on the message expiration property in the message
header, which unfortunately is not clearly defined and hence is not
yet implemented in Rabbit.

HTH,

Ben




More information about the rabbitmq-discuss mailing list