Connecting to Lenses

Connecting to a Lenses instance running behind a self-certified SSL where the certificates have not been stored in the JRE keystore, it requires an additional connection parameter: weakssl to true. This parameter instructs the driver to ignore any certificates which it cannot validate.

Properties props = new Properties();
props.setProperty("user", "myuser");
props.setProperty("password", "mypass");
props.setProperty("weakssl", "true");
Connection conn = DriverManager.getConnection(
        "jdbc:lsql:kafka:http://localhost:3030",
        props);

Notice we wrap up the user, password and weakssl parameters into a Properties object which is then passed into the connection method.