DMS for RocketMQ
Create a DMS for RocketMQ event source.
Prerequisites
- (Optional) You have created an event channel.
- You have purchased a DMS for RocketMQ instance. The instance contains topics and is in the Running state. For details, see Buying a RocketMQ Instance.
- You have created a private endpoint with the same VPC and subnet as the RocketMQ instance.
- You have configured the default security group with rules for the RocketMQ instance. For details, see How Do I Configure a Security Group When Creating an Event Source?
Creating a RocketMQ Event Source
- Log in to the EG console.
- In the navigation pane, choose Event Sources.
- Click Create Event Source.
- Set event source information by referring to Table 1.
Table 1 RocketMQ event source parameters Parameter
Description
Provider
The default value is Custom.
Type
Select DMS for RocketMQ.NOTE:You will be prompted to create an agency when creating your first DMS for RocketMQ event source. For details, see Authorization.
Name
Event source name.
The name cannot be modified once the event source is created.
Description
Describe the event source.
Channel
Select an existing custom event channel or click Create Event Channel to create one.
The channel cannot be modified once the event source is created.
Instance
Select a RocketMQ instance.
Self-hosted RocketMQ indicates your own RocketMQ.
Topic
Topic of the RocketMQ instance.
Consumer Group
Consumer group of the RocketMQ instance.
Username
Required if ACL has been enabled for the RocketMQ instance.
Secret Key
Required if ACL has been enabled for the RocketMQ instance.
VPC
Available only when you selected Self-hosted RocketMQ for Instance.
Subnet
Available only when you selected Self-hosted RocketMQ for Instance.
Connection Address
Available only when you selected Self-hosted RocketMQ for Instance. Enter the connection address of your own RocketMQ.
SSL
Available only when you selected Self-hosted RocketMQ for Instance. Specify whether to enable SSL.
SSL cannot be modified if your RocketMQ is running. If SSL is changed, delete the event source and create a new one.
ACL
Available only when you selected Self-hosted RocketMQ for Instance. Specify whether to enable ACL.
- Click OK.
View this event source on the Custom tab.
- Only the event source description can be modified. To modify it, click Edit in the row that contains the desired event source.
- To view details about a custom event source, click its name in the custom event source list.
Viewing the Event Format
Prerequisites
- You have created a RocketMQ instance.
- You have created an endpoint in the same VPC and subnet as the RocketMQ instance.
- Create an event channel.
- Creating a RocketMQ Event Source
- Create an event subscription whose source is RocketMQ and target is FunctionGraph.
- Send an event.
Figure 1 Sending an event
- View the event message format.
- View event trace details:
The event format within the message body is as follows:
{ "datacontenttype": "application/json", "data": { "context": "{\"hello\":\"world\"}", "topic": "topic-test" }, "subject": "ROCKETMQ:cn-north-4:f003dc69-2fc3-4c44-9062-0b9a2c6cb8cc/0ef1e7a03280f3ed2f69c00c652a5744:ROCKETMQ:source-rocketmq", "specversion": "1.0", "id": "e6cc599b-0664-4078-87dd-5630087d5f7e", "source": "source-rocketmq", "time": "2024-02-05T14:20:31Z", "type": "ROCKETMQ:CloudTrace:RocketmqCall" }
- View the logs of the target function.
- Log in to the FunctionGraph console, choose Functions > Function List in the navigation pane, and click the name of the target function to go to the function details page.
- Choose Monitoring > Logs > Request List and click a request ID to view the log details.
- View event trace details:
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