code: public MessageExchange take() throws BufferStoppedException, InterruptedException {
          MessageExchange currentExchange = null;
          try {
              idleConsumers.getAndIncrement();
              currentExchange = requests.take();
          } finally {
              idleConsumers.getAndDecrement();
          }
  
          if (status == Status.STOPPING && requests.size() <= 1) {
              status = Status.STOPPED;            
          }
  
          if (currentExchange == POISON) {
              putPoison();
              throw new BufferStoppedException();
          } else {
              listener.valuesChanged(this, consumersIdle(), requestsWaiting());
              diagnose("Took one request from buffer.");
              return currentExchange;
          }
      }
docs: Removes and returns a request from the buffer. The response related to the request is put into the
  <code>MessageExchange</code> as soon as available. If necessary waits until one request is available.
  
  @return the request wrapped in a <code>MessageExchange</code>. The response related to the request must
  be added to the <code>MessageExchange</code>.
  
  @throws BufferStoppedException
  thrown if no request is available anymore and the buffer was already stopped or stopped
  when waiting for a request to become available
  @throws InterruptedException
  when waiting for a request to become available the current {@link Thread} was interrupted