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.
Topic name¶
Obtain the topic name from the Topics page of the Kafka instance console.
Note
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.
Ciphertext Access¶
If ciphertext access is enabled for the instance, obtain the instance username and password, SASL mechanism, and security protocol. In addition, obtain the SSL certificate if the security protocol is set to SASL_SSL.
Obtain the username on the Users page on the Kafka console. If you forget your password, obtain it again by resetting the password.
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.
Obtain the security protocol from the Basic Information page on the Kafka console. For Kafka instances that were created much earlier, if Security Protocol is not displayed on the instance details page, SASL_SSL is used by default.
If Security Protocol is set to SASL_SSL, download the 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.