On 6 April 2015 at 22:04:38, Kyle Flavin (
kyle....@gmail.com) wrote:
> We have 4GB on our /var partition. It sounds like if I set the free
> space monitor from 50MB to a couple GB's, it will stop processing
> messages sooner?
Publishers will be blocked sooner, yes.
> ...(bloop://bloop_expand)
> What I need is the older messages/events to be cleared. It took
> about 2 months to fill the 4GB partition; it didn't happen overnight,
> so I think space-wise, we're okay. I'm noticing messages in the
> RDQ files from early March.
That is very odd. I wonder if there can be a queue that is accumulating messages
at a very slow rate due to a mistake somewhere?
> The thing is, our consumers need to
> deal with a message immediately. If the message isn't handled
> immediately, it becomes stale (within minutes) as far as our
> app is concerned, and there isn't any need to process it at a later
> time. So ideally, I'd like to not keep around any messages older
> than a day (or even a few hours).
> It looks like I might be able to accomplish this using TTL's on
> the messages?:
>
https://www.rabbitmq.com/ttl.html
Then TTL for messages sound exactly what you're looking for.
See
https://www.rabbitmq.com/blog/2014/01/23/preventing-unbounded-buffers-with-rabbitmq/,
too.
> Also, not sure if you saw it before, but I'm not currently ACK'ing
> messages from the consumer. I'm trying to determine if this is
> keeping the messages around longer than if I was ACK'ing them?
the "noack" option should be read as "no manual ack". Which means,
RabbitMQ considers a message to be acknowledged as soon as it writes it to the socket
(oversimplifying but you get the idea). So no, that is not the issue.
In summary, I'd bump free disk space limit 10 at least a few hundred MB and use TTL
on messages, as you say the messages in your system are ephemeral in nature.