Updated on 2023-09-04 GMT+08:00

Getting Started

Scenarios

This section describes how to call an API to create a standard queue to store messages.

For details on how to call APIs, see Calling APIs.

Prerequisites

Creating a Queue

The following is an example request for creating a first-in-first-out (FIFO) queue:
{
  "name" : "queue-001",
  "queue_mode" : "FIFO",
  "redrive_policy" : "enable",
  "max_consume_count" : 3
}
  • name: unique name of the queue
  • queue_mode: type of the queue. Options:
    • NORMAL: Standard queue, which supports high concurrency performance but cannot guarantee that messages are retrieved in the exact sequence as how they are received.
    • FIFO: FIFO queue, which guarantees that messages are retrieved in the exact sequence as how they are received.
    • KAFKA_HA: High-reliability Kafka queue. All message replicas are flushed to a disk synchronously, ensuring message reliability.
    • KAFKA_HT: High-throughput Kafka queue. All message replicas are flushed to a disk asynchronously, ensuring high performance.
  • redrive_policy: whether to enable dead letter messages. Options:
    • enable
    • disable
  • max_consume_count: maximum number of allowed message consumption failures. When a message fails to be consumed after the number of consumption attempts of this message reaches this value, DMS stores this message into the dead letter queue.

For details about the parameters, see Creating a Queue.