Dead Letter Queue
Introduction
If the dead letter queue function is enabled, EG sends failed events to the specified queue. If disabled, such events will be discarded.
Procedure
- Log in to the EG console.
- In the navigation pane, choose Event Subscriptions.
- Click Create Event Subscription.
- Click Event Target.
- In the displayed dialog box, select an event target.
- Enable Dead Letter Queue and configure the required parameters.
Figure 1 Configuring a dead letter queue
Table 1 Dead letter queue parameters Parameter
Description
Queue Type
Select a queue type.
Instance
Select an instance.
Connection
Select a connection.
NOTE:Select a connection whose type is the same as the queue type.
Topic
Select a topic.
NOTE:Do not use the same topic as the event target, or EG cannot distinguish successful events from failed ones.
- Click OK.
Processing Data in the Dead Letter Queue
Perform the following procedure to process the data in the dead letter queue.
- Log in to the FunctionGraph console. In the navigation pane, choose Functions > Function List.
- Click Create Function in the upper right. For details, see Creating an Event Function.
Figure 2 Function list
- Click the created function to go to the details page.
- Choose Configuration > Triggers and click Create Trigger.
Figure 3 Creating a trigger
- Set the following parameters:
- Trigger Type: Select DMS (for Kafka).
- Instance: Select the same Kafka instance as the dead letter queue.
- Topic: Select the same topic as the dead letter queue.
- Batch Size: Set the number of messages to be retrieved from the topic each time. Recommended: 10.
- Username: Enter the username of the instance if SSL has been enabled for it.
- Password: Enter the password of the instance if SSL has been enabled for it.
- Click OK.
- Click Enable to enable the Kafka trigger.
Figure 4 Enabling a Kafka trigger
- Compile the logic for processing data in the dead letter queue.
Figure 5 Data processing logic
- Configure a test event.
- Click Configure Test Event.
- Select DMS (for Kafka) and click Create.
Figure 6 Configuring a test event
- Select the created test event from the drop-down list.
- Click Test and then view the execution result.
Figure 7 Execution result
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