No, the Disruptor does not offer this option. Note that when the ring
buffer is full you can either block (RingBuffer.publishEvent) or fail
(RingBuffer.tryPublishEvent).
We feel that having a strict bound on the depth of the ring buffer is
the right implementation. If you allow the ring buffer to resize you
are effectively allowing an unbounded queue within the system. In
which case when the consumers are failing behind the producers, then
you have only one failure mode, which is to crash with an out of
memory error. With the bounded queue you set a limit to how far
behind you allow the consumers to get and when that limit is reached
you can make an informed decision on the appropriate action. As to
what that appropriate action should be will depend on your
application, unfortunately this is a question with no easy or
generalisable answer.
Mike.
On Wed, May 1, 2013 at 10:36 AM, Rajiv Kurian <
geet...@gmail.com> wrote:
> I have a use case with multiple concurrent producers but a single consumer.
> Is there a way for me to resize the ring buffer. My understanding is that if
> a producer is trying to add to a full ring buffer it would block till the
> consumer catches up. Could I instead under such a condition resize the ring
> buffer instead and keep the producer(s) blocking till then?
>
> Thanks,
> Rajiv
>
> --
> You received this message because you are subscribed to the Google Groups
> "Disruptor" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
lmax-disrupto...@googlegroups.com.
> For more options, visit
https://groups.google.com/groups/opt_out.
>
>