docs: private boolean takeMessage(SIMPMessage msg, boolean isOnItemStream)
                      throws SIResourceException
      {
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
              SibTr.entry(tc, "takeMessage", new Object[] { this, msg, Boolean.valueOf(isOnItemStream) });
  
          boolean msgTaken = false;
  
          // Put should only have been called if we said we were Ready but
          // we'll double check we are still Ready as there is a window where
          // we could have stopped/closed/ended the receive after the CD
          // had picked us from the ready list.
          if ((_ready && (_keyGroup == null)) || (_keyGroup != null) && (_keyGroup.isGroupReady()))
          {
              //Consumer is still ready so it can take the message
              //indicate that we're not Ready for any more messages
              //setReadyState(false);
              _ready = false;
  
              if (_keyGroup != null)
                  _keyGroup.groupNotReady();
  
              // Before we can take the message we need to know that this consumer or its
              // ConsumerSet will allow it (they haven't reached their maxActiveMessage limits).
              // If they will accept it we have to, in the case of a ConsumerSet, 'reserve' the
              // space upfront because multiple members of the set could be concurrently adding
              // active messages. If this add happens to take the last available slot in the set's
              // quota it will keep the set write-locked for the duration of the message lookup. During
              // this time no other consumers in the set will be able to add any more messages.
              // This is done to ensure that the set's suspend/resume state is consistent and we don't
              // have to try to un-suspend consumers when we find there isn't a message to take after all.
              boolean msgAccepted = prepareAddActiveMessage();
              if (!msgAccepted)
              {
                  if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                      SibTr.debug(tc, "The consumer set is already suspended ");
              }
              else
              {
                  boolean activeMessageAttached = false;
                  // Whatever the outcome we must commit or rollback the prepareAddActiveMessage()
                  try
                  {
                      //we HAVE taken this message
                      msgTaken = true;
  
                      //attach the message we have taken
                      try
                      {
                          activeMessageAttached = attachAndLockMsg(msg, isOnItemStream);
                      } catch (SIResourceException e)
                      {
                          // No FFDC code needed
                          SibTr.exception(tc, e);
  
                          activeMessageAttached = false;
                          checkWaiting();
  
                          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                              SibTr.exit(tc, "takeMessage", e);
  
                          throw e;
                      }
  
                      // We found an attached message, therefore we have another active
                      // message so commit the prepare we did above.
                      if (activeMessageAttached)
                          commitAddActiveMessage();
  
                      checkWaiting();
                  } finally
                  {
                      // If a message wasn't attached the commit won't have happened, instead
                      // roll back the prepare of the add, as if the prepare never happened.
                      if (!activeMessageAttached)
                          rollbackAddActiveMessage();
                  }
              }
          }
  
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
              SibTr.exit(tc, "takeMessage", Boolean.valueOf(msgTaken));
  
          return msgTaken;
      }