code: public void stop() {
          started = false;
          senderSessionPool.close();
          receiverSessionPool.close();
          listenerConsumers.forEach(Util::closeQuietly);
          listenerSessions.forEach(Util::closeQuietly);
  
          closeQuietly(producerConnection);
          closeQuietly(consumerConnection);
  
          try {
              ActiveMQServerControl control = jmsServer.getActiveMQServer().getActiveMQServerControl();
              String[] remoteAddresses = control.listRemoteAddresses();
              for (String address : remoteAddresses) {
                  control.closeConnectionsForAddress(address);
              }
          } catch (Exception e) {
              LOGGER.warn("exception trying to close remote connections.", e);
          }
          try {
              jmsServer.stop();
          } catch (Exception e) {
              LOGGER.warn("exception trying to stop broker.", e);
          }
      }
docs: Stops this JMS server.