private void declareQueueIfMissing(Connection connection) throws IOException, TimeoutException {
      Channel channel = connection.createChannel();
      try {
        // check if queue already exists
        channel.queueDeclarePassive(builder.queue);
        channel.close();
      } catch (IOException maybeQueueDoesNotExist) {
        Throwable cause = maybeQueueDoesNotExist.getCause();
        if (cause != null && cause.getMessage().contains("NOT_FOUND")) {
          channel = connection.createChannel();
          channel.queueDeclare(builder.queue, true, false, false, null);
          channel.close();
        } else {
          throw maybeQueueDoesNotExist;
        }
      }
    }
Lazy creates a connection and a queue before starting consumers
zipkin-collector/rabbitmq/src/main/java/zipkin2/collector/rabbitmq/RabbitMQCollector.java