code: void removeConsumer(JmsMsgConsumerImpl consumer) throws JMSException {
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
              SibTr.entry(this, tc, "removeConsumer", consumer);
  
          // if DUPS_OK_ACKNOWLEDGE is in use, commit any messages delivered in the
          // last incomplete batch (if the session is closing it will already have
          // done this and the count of uncommitted messages will be zero)
          if ((acknowledgeMode == Session.DUPS_OK_ACKNOWLEDGE) && (uncommittedReceiveCount > 0)) {
              commitTransaction();
          }
          syncConsumers.remove(consumer);
          asyncConsumers.remove(consumer);
  
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
              SibTr.exit(this, tc, "removeConsumer");
      }
docs: This method is called by a JmsMsgConsumer in order to remove itself from
  the list of consumers held by the Session.
  
  @param JmsMsgConsumer The Consumer which is calling the method.