How to pass trustStore info to kafka client configuration

Viewed 184

I'm trying to collect data stream from nasdaq in NodeJS the same way they are doing it on this repository with Java https://github.com/Nasdaq/CloudDataService.

The problem I'm facing is that I can't find any way to pass the trust :

const kafka = new Kafka({
  clientId: 'client-id',
  brokers: ['borker:9094'],
  // authenticationTimeout: 1000,
  // reauthenticationThreshold: 10000,
  ssl: true,
  sslOptions: {
    trustStore: "ncdsTrustStore.p12",
    trustStorePassword:"pass_word",
    trustStoreType:"PKCS12"
  },
  logLevel: logLevel.ERROR,
  sasl: {
    mechanism: 'oauthbearer',
    oauthBearerProvider: async () => {
      const token = "TOKEN"
      console.log(token)
      return {
        value: token
      }
    }
  },
})
0 Answers
Related