Message Queue for Apache Kafka provides SDKs for multiple programming languages to help you send and receive messages.
Introduction
An SDK (Software Development Kit) includes samples, libraries, toolchains, and build scripts. You can develop and compile applications directly in the SDK environment without additional configuration.
SDKs
Message Queue for Apache Kafka provides SDKs for the following programming languages. You can use these links to view update histories, download installation packages, and access reference documentation.
| SDK | Demo | Supported protocol | Reference | README file |
| Java SDK | Java SDK Demo |
|
Send and receive messages using an instance endpoint | README.md |
| Python SDK | Python SDK Demo |
|
Send and receive messages using the Python SDK | |
| C++ SDK | C++ SDK Demo |
|
Send and receive messages using the C++ SDK | |
| Go SDK | Go SDK Demo |
|
Send and receive messages using the Go SDK | README.md |
| PHP SDK | PHP SDK Demo |
|
Send and receive messages using the PHP SDK | |
| Ruby SDK | Ruby SDK Demo |
|
Send and receive messages using the Ruby SDK | README.md |
| Node.js SDK | Node.js SDK Demo |
|
Send and receive messages using the Node.js SDK | README.md |
| C# SDK | N/A |
|
Send and receive messages using the C# SDK | README.md |
Usage notes
Instance endpoints
Your client connects to Message Queue for Apache Kafka through different endpoints to send and receive messages.
- Default Endpoint: Connects clients to a Message Queue for Apache Kafka instance to send and receive messages.
- SSL Endpoint: Connect to a Message Queue for Apache Kafka instance over SSL and use the PLAIN mechanism for authentication. PLAIN is a username-and-password authentication method. Message Queue for Apache Kafka optimizes the PLAIN mechanism to let you dynamically add SASL users without restarting the instance.Important If your instance uses a 1024-bit SSL certificate and you require stronger security, you can upgrade it to a 4096-bit certificate. For more information, see Upgrade the SSL certificate algorithm.
- SASL Endpoint: In a VPC, you can connect to Message Queue for Apache Kafka using a SASL endpoint and use the PLAIN or SCRAM mechanism to send and receive messages. SASL supports the following authentication mechanisms:
- PLAIN: A username-and-password authentication method. The PLAIN mechanism in Message Queue for Apache Kafka allows you to dynamically add SASL users without restarting the instance.
- Message Queue for Apache KafkaSCRAM-SHA-256: A secure authentication mechanism that uses hash algorithms on both the client and server to verify credentials. This mechanism provides higher security than PLAIN and also lets you dynamically add SASL users without an instance restart.
For more information about endpoints, see Endpoint comparison.
Demo usage
Select the demo that matches your instance, configure the demo file, and run it to send and receive messages. For detailed instructions, see the documentation for each language.
References
- Deploy a Message Queue for Apache KafkaMessage Queue for Apache Kafka instance based on your required network type. For more information, see Connect to a Message Queue for Apache Kafka instance over a VPC and Deploy an instance accessible from the internet and a VPC.
- Create the required consumer group and topic. For more information, see Step 3: Create resources.
- The default SASL user for an internet or VPC instance provides only identity verification. It has read and write permissions for all topics and consumer groups. For more granular access control, enable the ACL feature to create SASL users and grant them specific permissions. Enabling the ACL feature revokes the permissions of the default SASL user. For more information, see Grant permissions to SASL users.