8 Replies Latest reply on Jul 17, 2012 2:48 PM by bruceas

    When address-full-policy = BLOCK, when is the block actually released?

    bruceas Newbie

      I have the following test situation:

      1. fast producer, producing homogeneous messages every 1 second

      2. slow consumer, consuming these messages every 5 seconds

      3. address-full-policy=BLOCK for the appropriate address

       

      I do the following:

      1. Start the fast producer; it continues to write messages every 1 second until max-size-bytes is reached, and then is blocked (as expected)

      2. Start the slow consumer; it starts to read messages every 5 seconds (as expected)

       

      My expectation was that when the slow consumer would read one message, it would free up space in the queue and the producer would be able to write one message (so every time a message was read, the producer would write another message).

      What I observed,however, was that the slow consumer reads a *number* of messages before the producer is unblocked; once unblocked, the producer writes a number of messages until max-size is reached and the process repeats itself.

       

      What exactly controls the unblocking? (e.g. is there a periodic timer that checks the size of the queue and releases the block if space is available? Is there some sort of hystersis inolved [e.g. the free space has to drop back down to 80% of the max-size-bytes before the block is released?])

       

       

      Thanks