All Products
Search
Document Center

:Overview

Last Updated:Mar 15, 2024

This topic describes how to get started with Message Service (MNS).

Background information

MNS provides the queue-based messaging model and the topic-based messaging model.

Get started with the queue-based messaging model

In this example, messages are sent and received in the MNS console. Figure 1 shows the procedure for using the queue-based messaging model.

Figure 1. Procedure for using the queue-based messaging model队列模型

To use the queue-based messaging model to send and receive messages in the MNS console, perform the following steps:

  1. Create a queue.

  2. Send a message.

  3. Receive a message.

  4. Delete a queue.

Get started with the topic-based messaging model

The topic-based messaging model supports multiple types of endpoints, such as email addresses, mobile numbers, queues, and HTTP or HTTPS servers. In this example, messages are sent to a queue. Figure 2 shows the procedure for using the topic-based messaging model.

Figure 2. Procedure for using the topic-based messaging model主题模型

To use the topic-based messaging model to send messages to a queue in the MNS console, perform the following steps:

  1. Create a queue.

  2. Create a topic.

  3. Create a subscription.

  4. Publish a message.

  5. Receive a message.

  6. Delete a queue.

  7. Delete a topic.

References

For information about how to use SDKs for different programming languages to send and receive messages, see SDK reference.