If you want to use an SDK to connect to ApsaraMQ for Kafka to send and receive messages, you must specify an endpoint based on the network type of the ApsaraMQ for Kafka instance. This topic describes how to view the endpoints of an ApsaraMQ for Kafka instance in the ApsaraMQ for Kafka console.
Background information
ApsaraMQ for Kafka provides the following types of endpoints:
Default endpoint: allows you to send and receive messages in a virtual private cloud (VPC) but does not support Simple Authentication and Security Layer (SASL) authentication.
SASL endpoint: allows you to send and receive messages in a VPC and supports SASL authentication.
SSL endpoint: allows you to send and receive messages over the Internet and supports SASL authentication.
For information about the differences between the preceding types of endpoints, see Comparison among endpoints.
Usage notes
ApsaraMQ for Kafka instances support endpoints in the
Instance domain name:Port number
format.The endpoints of serverless ApsaraMQ for Kafka instances are displayed in the Instance domain name:Port number format.
Procedure
Log on to the ApsaraMQ for Kafka console. In the Resource Distribution section of the Overview page, select the region where the ApsaraMQ for Kafka instance that you want to manage resides.
On the Instances page, click the name of the instance that you want to manage.
In the Instance Details section of the Endpoint Information page, view the endpoints.
NoteIf your instance is a VPC-connected instance, only the default endpoint is displayed.
If your instance is an Internet- and VPC-connected instance, the default endpoint and SSL endpoint are displayed.
What to do next
After you obtain the endpoint of an ApsaraMQ for Kafka instance, you can use an SDK to connect to the ApsaraMQ for Kafka instance to send and receive messages. For more information, see Overview.
If your ApsaraMQ for Kafka instance is connected to a VPC by using a leased line, change the addresses in Domain Name System (DNS) records to 100.100.2.136 and 100.100.2.138 before you use an SDK to access the instance.