code: public synchronized void shutdown() {
      if (isActive()) {
        // mark this as no longer running
        setActive(false);
      
        if (topicConnection != null) {
          try {
            topicConnection.close();
          } catch (Exception e) {
            // do nothing
          }
          topicConnection = null;
        }
      }
    }
docs: Called when the receiver should be stopped.