docs: private MessageConsumer createConsumer(Destination destination, String name, String messageSelector, boolean noLocal,
                                             boolean isSharedNonDurable) throws JMSException {
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
              SibTr.entry(this, tc, "createConsumer", new Object[] { destination, messageSelector, noLocal, isSharedNonDurable });
          JmsMsgConsumer consumer = null;
  
          checkNotClosed();
          if (destination == null) {
              throw (InvalidDestinationException) JmsErrorUtils.newThrowable(InvalidDestinationException.class,
                                                                             "INVALID_VALUE_CWSIA0048",
                                                                             new Object[] { "Destination", "null" },
                                                                             tc
                              );
          }
  
          if (isSharedNonDurable) {
              if ((name == null) || ("".equals(name))) {
                  throw (JMSException) JmsErrorUtils.newThrowable(JMSException.class,
                                                                  "INVALID_VALUE_CWSIA0048",
                                                                  new Object[] { "sharedSubscriptionName", name },
                                                                  tc
                                  );
              }
          }
  
          // Check that this is not a foreign implementation.
          // Note that in some situations this method call can return a _different_
          // destination than the one passed in as the parameter (e.g. Spring).
          JmsDestinationImpl nativeDest = JmsDestinationImpl.checkNativeInstance(destination);
  
          // Check that this destination is not blocked from creating consumers
          JmsDestinationImpl.checkBlockedStatus(nativeDest);
  
          // create the consumer properties object filling in as much information
          // as we have available at the moment.
          ConsumerProperties newProps = new ConsumerProperties(nativeDest,
                          null, // DestType                filled in later
                          messageSelector, // Selector
                          null, // Reliability             filled in later
                          false, // ReadAhead               filled in later
                          true, // RecovExpress            filled in later
                          noLocal, // NoLocal
                          name, // SubName  .. with JMS 2.0, the value is set for all cases
                          connection.getClientID(), // ClientID .. with JMS 2.0, the value is set for all cases
                          isSharedNonDurable, // SupportMultiple .. with JMS 2.0, the value is set for all cases         
                          null // DurableSubscriptionHome n/a for non-durable consumers
          );
  
          // Hold the state lock while the msg consumer constructor is called to prevent
          // it from reading invalid start/stopped state while start is in progress. This
          // will basically cause and createConsumer calls on this session to wait until
          // session.start is complete.
          synchronized (stateLock) {
              consumer = instantiateConsumer(newProps);
              // newly created consumers must be synchronous
              syncConsumers.add(consumer);
  
              // d353701 - output a warning message if there are 'lots' of producers active.
              int totalConsumers = syncConsumers.size() + asyncConsumers.size();
              if (totalConsumers % PROD_CONS_WARNING_THRESHOLD == 0) {
                  // We wish to tell the user which line of their application created the session,
                  // so we must obtain a line of stack trace from their application.
                  String errorLocation = JmsErrorUtils.getFirstApplicationStackString();
                  SibTr.warning(tc, "MANY_CONSUMERS_WARNING_CWSIA0059", new Object[] { "" + totalConsumers, errorLocation });
              }
  
          }
  
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
              SibTr.exit(this, tc, "createConsumer", consumer);
          return consumer;
      }