To use the SDK to connect to a Message Queue for Apache Kafka instance and send and subscribe to messages, you must configure an endpoint based on the network type of the instance. You can view the endpoint of your instance in the Message Queue for Apache Kafka console.
Message Queue for Apache Kafka provides the following types of endpoints:
- Default endpoint: It is used 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: It is used to send and subscribe to messages in a VPC, and supports SASL authentication.
- Secure Sockets Layer (SSL) endpoint: It is used to send and subscribe to messages over the Internet, and supports SASL authentication.
For more information about the differences among these endpoints, see Comparison among endpoints.
- Log on to the Message Queue for Apache Kafka console.
- In the top navigation bar, select the region where your resource resides.
- In the left-side navigation pane, click Instances.
- On the Instances page, click the name of your instance.
- On the Instance Details page, view the endpoint of the instance in the Basic Information section.Note
- If the value of Instance Type is VPC Instance, only Default Endpoint is displayed.
- If the value of Instance Type is Public Network/VPC Instance, both Default Endpoint and SSL Endpoint are displayed.
- By default, SASL endpoints are not configured for instances. Therefore, by default, SASL endpoints are not displayed. To use SASL endpoints, you must apply for authorization. For more information, see Authorize SASL users.