cckellogg commented on a change in pull request #428:
URL: https://github.com/apache/pulsar-client-go/pull/428#discussion_r548061983
##########
File path: perf/pulsar-perf-go.go
##########
@@ -49,6 +53,23 @@ func NewClient() (pulsar.Client, error) {
clientOpts := pulsar.ClientOptions{
URL: clientArgs.ServiceURL,
}
+
+ if clientArgs.TokenFile != "" {
+ // read JWT from the file
+ tokenBytes, err := ioutil.ReadFile(clientArgs.TokenFile)
+ if err != nil {
+ log.WithError(err).Errorf("failed to read Pulsar JWT
from a file %s", clientArgs.TokenFile)
+ os.Exit(1)
+ }
+ clientOpts.Authentication =
pulsar.NewAuthenticationToken(string(tokenBytes))
+ }
+
+ if strings.HasPrefix(clientArgs.ServiceURL, "pulsar+ssl://") {
+ if clientArgs.TLSTrustCertFile == "" {
Review comment:
If the broker certificate is signed by a known verifier is the trust
cert still needed?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]