Distributed Message Service (DMS) for Kafka
Configure a DMS for Kafka instance as the source of an event stream.
Prerequisites
- You have purchased a Kafka instance on the DMS for Kafka console. For details, see Buying a Kafka Instance.
- The security group of the Kafka instance allows access from the subnet and port of the Kafka instance in the inbound rules. For details, see Viewing the Subnet CIDR Block,Kafka Instance Port, and Adding a Security Group Rule.
Procedure
- Log in to the EG console.
- In the navigation pane, choose Event Streams > Serverless Event Streams.
- Click Create Serverless Event Stream, click the
icon in the upper left corner, enter the event stream name and description, and click OK.
- Configure a Kafka event source.
- Click Event Source.
- Select Distributed Message Service (DMS) for Kafka for Event Provider.
- Set event source parameters.
Table 1 Kafka parameters Parameter
Description
Instance
Select a Kafka instance.
Access Mode
Select Ciphertext Access or Plaintext Access.
Security Protocol
If you select Ciphertext Access for Access Mode, the corresponding security protocol will be displayed.
Topic
Select a topic.
Consumer Group
Enter a consumer group name containing 3 to 64 characters.
- If the consumer group does not exist, it will be created in the Kafka instance when the event stream is enabled. For details, see Querying the Kafka Consumer Group List.
- If the consumer group has been created for the Kafka instance, enter the created consumer group name. For details, see Creating a Kafka Consumer Group.
Concurrency
Enter the number of concurrent messages. Range: 1–1000.
This parameter is autofilled with the number of partitions for the selected topic. Recommended: retain this default number.
Consumption Offset
Select a consumption offset.
- Latest: Consumption starts from the latest message in the queue.
- Earliest: Consumption starts from the earliest message in the queue.
SASL Mechanism
This parameter is available when SASL_SSL authentication is enabled for the Kafka instance. Select an SASL authentication mechanism.
- PLAIN: a simple username and password verification mechanism.
- SCRAM-SHA-512: uses the hash algorithm to generate credentials for usernames and passwords to verify identities. SCRAM-SHA-512 is more secure than PLAIN.
SASL Certificate URL
This parameter is available when SASL_SSL authentication is enabled for the Kafka instance. Enter an SASL certificate URL. For details about the URL, see How Do I Obtain the SASL Certificate Address of a DMS for Kafka Instance?.
- The package must be in ZIP format. The number of files in the package cannot exceed two. The size of the package and file cannot exceed 1 MB.
- The certificate name must be fixed to client.jks.
- If the SASL certificate is modified, perform either of the following operations to ensure that the certificate takes effect:
- If the SASL certificate file name is changed, obtain the certificate address again, enter the address, and click Save.
- If the file name remains the same but one of the parameter Topic, Consumer Group, SASL Mechanism, SASL Certificate Key, Username, or Password is modified, click Save to reload the certificate.
SASL Certificate Key
This parameter is available when SASL_SSL authentication is enabled for the Kafka instance. Enter an SASL certificate key. The SASL certificate key is dms@kafka, which is obtained from the Kafka instance details page.
Username
This parameter is available when SASL_SSL authentication is enabled for the Kafka instance. Enter a username.
Password
This parameter is available when SASL_SSL authentication is enabled for the Kafka instance. Enter a password.
- Click Save.
- Configure an event target by referring to Routing to FunctionGraph.
- After the event source and target are configured, click Save in the upper right.
If sending events to the target fails, the whole batch of events will be retried until the processing is successful or the source message expires. The target must be able to process duplicate events.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot