On Wed, Apr 2, 2008 at 11:39 PM, Arjen van der Meijden <
[EMAIL PROTECTED]> wrote:

> I would go with 1. But you may want to add some control-code to ensure you
> can easily and cleanly kill your scripts. In my code, I added a few signal
> handlers, so the consumer first finishes its most recent job and then dies.
> But than the fread-calls in the Stomp-implementation won't get interrupted.
> So I've a 'kill'-message for that situation, so my consumer dies as soon as
> its either blocked in fread waiting for a new message or right after its
> current job.


Is your "kill"-message on every call? Or is that only when you manually
interrupt it? I'm wondering if you changed the Stomp-implementation such
that if you've consumed all of the messages (and it's waiting for a new
message to come through), it automatically dies. Or is it part of your
"clean kill" that would make sure it finishes what it was doing, and then
properly shuts down.

In my particular application, I would most likely have an internal queue in
the consumer that would basically consume messages until it hit some number
(say 100) and then batch process all 100 of them at once. Then it would go
back to trying to consume messages again and filling up the internal queue.
It's better for me to batch process 100 messages at once rather than 1 at a
time. That's why I was asking about the memory leak issues.

Thanks,

-- Joel

Reply via email to