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

Background information

MNS provides the following two types of messaging models: queue-based messaging model and topic-based messaging model.

Get started with queue-based messaging

In this example, messages are sent and received in the MNS console. The procedure is shown in Figure 1.

Figure 1. Procedure of queue-based messaging
Queue-based messaging

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 topic-based messaging

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. The procedure is shown in Figure 2.

Figure 2. Procedure of topic-based messaging
Topic-based messaging

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 languages to send and receive messages, see SDK reference.