Updated on 2025-02-05 GMT+08:00

Collecting Connection Information

Before accessing a Kafka instance for message production and consumption, obtain the following information of the instance.

Instance Connection Address and Port

Obtain them from the Basic Information page on the Kafka console.

For a cluster Kafka instance that has at least three connection addresses, you are advised to configure all of the connection addresses on the client for high reliability.

For public network access, you can use the public network addresses displayed on the Basic Information page.

Figure 1 Viewing the connection addresses and ports of brokers of a Kafka instance

Topic name

Obtain the topic name from the Topics page of the Kafka instance console.

If Automatic Topic Creation is disabled, a topic must be created first. Then a Kafka instance can be accessed from a client for message production and consumption.

SASL

If SASL_SSL is enabled for the instance during instance creation, obtain the SASL_SSL username, password, certificate, and mechanism.

  • Obtain the username on the Users page on the Kafka console. If you forget your password, obtain it again by "resetting SASL_SSL password" in Distributed Message Service for Kafka User Guide.
    Figure 2 Obtaining the SASL_SSL username
  • Obtain the SASL mechanism from the Basic Information page on the Kafka console.
    If both SCRAM-SHA-512 and PLAIN are enabled, use either of them in connection configurations. For instances that were created much earlier, if SASL Mechanism is not displayed on the instance details page, PLAIN is used by default.
    Figure 3 SASL mechanism in use
  • Obtain the SSL certificate from the Basic Information page on the Kafka console.

    JKS certificates are used for accessing instances in Java. CRT certificates are used for accessing instances in Python.