ActiveMQSpanConsumer doInit() {
    final ActiveMQConnection connection;
    try {
      connection = (ActiveMQConnection) connectionFactory.createQueueConnection();
      connection.start();
    } catch (JMSException e) {
      throw uncheckedException("Unable to establish connection to ActiveMQ broker: ", e);
    }

    try {
      ActiveMQSpanConsumer result = new ActiveMQSpanConsumer(collector, metrics, connection);

      for (int i = 0; i < concurrency; i++) {
        result.registerInNewSession(connection, queue);
      }

      return result;
    } catch (JMSException e) {
      try {
        connection.close();
      } catch (JMSException ignored) {
        // EmptyCatch ignored
      }
      throw uncheckedException("Unable to create queueReceiver(" + queue + "): ", e);
    }
  }
Lazy creates a connection and registers a message listener up to the specified concurrency level.
This listener will also receive health notifications.
zipkin-collector/activemq/src/main/java/zipkin2/collector/activemq/LazyInit.java