You need to configure an endpoint for a Message Queue for Apache Kafka instance based on your network type before you can use an SDK to access Message Queue for Apache Kafka and send and subscribe to messages. This topic describes how to view the endpoints of an instance in the Message Queue for Apache Kafka console.

Background information

Message Queue for Apache Kafka provides the following types of endpoints:
  • Default endpoint: allows you to send and subscribe to 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 subscribe to messages in a VPC, and supports SASL authentication.
  • Secure Sockets Layer (SSL) endpoint: allows you to send and subscribe to messages over the Internet, and supports SASL authentication.

For more information about differences among these endpoints, see Comparison among endpoints.

Usage notes

Endpoints of newly purchased Message Queue for Apache Kafka instances are in the Instance domain name:Port number format.

However, the endpoints of existing Message Queue for Apache Kafka instances still retain the Broker IP address:Port number format. To ensure that the service runs smoothly and users have optimal experience, we recommend that you change the endpoint format of existing Message Queue for Apache Kafka instances to Instance domain name:Port name in a timely manner.

Procedure

  1. Log on to the Message Queue for Apache Kafka console.
  2. In the Resource Distribution section of the Overview page, select the region where your instance resides.
  3. On the Instances page, click the name of the instance that you want to manage.
  4. On the Instance Details page, view the endpoints of the instance in the Endpoint Information section.
    • You can find the endpoint in the format of Instance domain name:Port number in the Domain name column.
    • Alternatively, you can find the endpoint in the format of Broker IP address:Port number by performing the following steps:
      1. In the Endpoint Information section of the Instance Details page, click Enable Domain Name Feature in the Actions column of an endpoint whose format you want to change.
      2. In the Enable Domain Name Feature dialogue box that appears, read the message and then click Enable.
      3. The format of the instance endpoint is automatically changed. You can view the new endpoint in the Domain name column.

        You can continue to use endpoints in the Broker IP address:Port number format. You can view this original format of an endpoint by moving the pointer over the domain name.

    Note
    • If the value of Instance Type is VPC Type, only the default endpoint is displayed.
    • If the value of Instance Type is Internet and VPC Type, both the default endpoint and SSL endpoint are displayed.
    • By default, SASL endpoints are not configured for instances. Therefore, SASL endpoints are not displayed. To use SASL endpoints, you must apply for authorization. For more information, see Grant permissions to SASL users.

What to do next

After you obtain the endpoint of your Message Queue for Apache Kafka instance, you can use an SDK to connect to the instance, and then send and subscribe to messages. For more information, see Overview.
Note When the instance is connected to a VPC through a leased line, you must 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.