All Products
Search
Document Center

Simple Message Queue (formerly MNS):Overview

Last Updated:Oct 22, 2024

This topic describes the download sources and sample code of Simple Message Queue (SMQ) SDK for PHP.

Download sources

Select a version based on your business requirements before you download SMQ SDK for PHP. SMQ allows you to download the SDK for PHP from Packagist or GitHub.

Source

Description

Packagist

Packagist provides the source code packages of SMQ SDK for PHP that you can download. You can view the specific versions of dependencies of SMQ SDK for PHP in Packagist.

For more information, visit aliyun-mns-php-sdk.

GitHub

GitHub provides the source code of SMQ SDK for PHP and records tag information about the released versions of SMQ SDK. You can view the source code and sample code that you can use in various scenarios at GitHub. For more information, visit aliyun-mns-php-sdk.

Note
  • In this example, SMQ SDK for PHP V1.3.7 is used. For more information, see Release notes.

  • We recommend that you use the latest version of SMQ SDK for PHP for debugging.

Sample code

SMQ SDK for PHP provides a variety of sample code for your reference or use. The following table describes the sample code files provided by SMQ SDK for PHP.

Type

Content

References

Demo download

Queue

Create a queue

Use queues

CreateQueueAndSendMessage.php

Send a message

Receive and consume a message

Delete a queue

Topic

Create a topic

Use topics

CreateTopicAndPushMessageToQueue.php

Create a subscription whose downstream is a queue

Send a message

Subscribe to a topic to receive messages on downstream clients

Delete a topic