Search in sources :

Example 6 with ClientBuilder

use of org.apache.pulsar.client.api.ClientBuilder in project incubator-pulsar by apache.

the class PulsarClientTool method updateConfig.

private void updateConfig() throws UnsupportedAuthenticationException, MalformedURLException {
    ClientBuilder clientBuilder = PulsarClient.builder();
    if (isNotBlank(this.authPluginClassName)) {
        clientBuilder.authentication(authPluginClassName, authParams);
    }
    clientBuilder.enableTls(this.useTls);
    clientBuilder.allowTlsInsecureConnection(this.tlsAllowInsecureConnection);
    clientBuilder.tlsTrustCertsFilePath(this.tlsTrustCertsFilePath);
    clientBuilder.serviceUrl(serviceURL);
    this.produceCommand.updateConfig(clientBuilder);
    this.consumeCommand.updateConfig(clientBuilder);
}
Also used : ClientBuilder(org.apache.pulsar.client.api.ClientBuilder)

Aggregations

ClientBuilder (org.apache.pulsar.client.api.ClientBuilder)6 PulsarClient (org.apache.pulsar.client.api.PulsarClient)4 JCommander (com.beust.jcommander.JCommander)3 ParameterException (com.beust.jcommander.ParameterException)3 ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)3 ObjectWriter (com.fasterxml.jackson.databind.ObjectWriter)3 RateLimiter (com.google.common.util.concurrent.RateLimiter)3 FileInputStream (java.io.FileInputStream)3 Properties (java.util.Properties)3 Parameter (com.beust.jcommander.Parameter)2 Lists (com.google.common.collect.Lists)2 DecimalFormat (java.text.DecimalFormat)2 List (java.util.List)2 Map (java.util.Map)2 Future (java.util.concurrent.Future)2 TimeUnit (java.util.concurrent.TimeUnit)2 LongAdder (java.util.concurrent.atomic.LongAdder)2 Histogram (org.HdrHistogram.Histogram)2 StringUtils.isBlank (org.apache.commons.lang3.StringUtils.isBlank)2 StringUtils.isNotBlank (org.apache.commons.lang3.StringUtils.isNotBlank)2