QUEUE database with multiple consumers -
08-03-2006
, 09:12 AM
Hi,
Is there a good way to get QUEUE append/consume semantics for a set of
consumers if all consumers must receive each piece of data? From the
API docs it appears that only one consumer sees a given value. I'd just
open a cursor for each consumer, but I need something like CONSUME_WAIT
to block consumers if EOF hasn't been "sent" yet (and automatically
unblock them when data arrives).
Our current approach uses in-memory blocking queues with a fixed
capacity. This works very nicely until the wrong combination of queues
fills up and causes a deadlock. It is also a memory management headache
because there's no graceful way to reduce the memory usage of existing
queues as the number of queues grows. Having something backed by the
BDB cache would fix both of those problems.
Thanks,
Ryan |