Error : Caused by: KafkaJSError: This is not the correct coordinator for this group

  Kiến thức lập trình

I am trying to connect to a 3rd party broker using ssl.
I got 4 files from the external team

  1. server.pem
  2. ca-certificate.pem
  3. server-private.key
  4. server-private.pem

I am trying to connect using FQDN but getting error Error : Caused by: KafkaJSError: This is not the correct coordinator for this group. What could be the issue? Am I using the certificates in the wrong way?

Below is the kafka config which I am using.

const ca = fs.readFileSync(path.join(__dirname, 'path/to/ca-certificate.pem'), 'utf-8');
const cert = fs.readFileSync(path.join(__dirname, 'path/to/server.pem'), 'utf-8');
const keyPem = fs.readFileSync(path.join(__dirname, 'path/to/server-private.pem'), 'utf-8');
const key = fs.readFileSync(path.join(__dirname, 'path/to/server-private.key'), 'utf-8');


  const kafkaConfig = {
      clientId: "test-client-id",
      brokers: ["fqdn-example1.com:9093", "jfqdn-example2.com:9093", "jfqdn-example3.com:9093"],
      ssl: {
          rejectUnauthorized: true, 
          ca: [ca],
          cert: cert,
          key: key + 'n' + keyPem,
      
      },
      connectionTimeout: 10000,
      authenticationTimeout: 10000,
      logLevel: logLevel.DEBUG
  };

Theme wordpress giá rẻ Theme wordpress giá rẻ Thiết kế website

LEAVE A COMMENT