myziyue / aliyun-mq-client-php

A Php Client for Aliyun RocketMQ

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

aliyunmq-client-php


[中文文档] | [English]

A Php Client for Aliyun RocketMQ.

Note: because Aliyun's CPP SDK does not support the Coroutine, this extension is temporarily unavailable under the Coroutine framework.

dependence

 In php7.1 environment, php-cpp 2.2.0 is recommended.

INSTALL

  1. Install aliyun-mq-linux-cpp-sdk
# wget "https://ons-client-sdk.oss-cn-hangzhou.aliyuncs.com/linux_all_in_one/2.1.0/rhel7u2/aliyun-mq-linux-cpp-sdk.tar.gz?spm=a2c4g.11186623.2.18.22323a04UlcEJo&file=aliyun-mq-linux-cpp-sdk.tar.gz" -O aliyun-mq-linux-cpp-sdk.tar.gz
# tar zxvf aliyun-mq-linux-cpp-sdk.tar.gz
# cd aliyun-mq-linux-cpp-sdk/
# cp -rf include/* /usr/include/
# cp -rf lib/* /lib64/
  1. Install PHP-CPP
# git clone https://github.com/CopernicaMarketingSoftware/PHP-CPP.git
# cd PHP-CPP
# make && make install
  1. Install aliyunmq-client-php
# sh build.sh
  1. update php.ini file, add line extension=aliyunmq.so;
# echo "extension=aliyunmq.so" >> $PHP_INSTALL_PATH/etc/php.ini
# echo 'aliyunmq.log_path="/tmp/"' >> $PHP_INSTALL_PATH/etc/php.ini

Usage

to see autocompelete file.

Example

to see example file.

todo

  • 普通消息发送
  • 顺序消息发送
  • 定时消息发送
  • 事物消息发送
  • 消息接收

About

A Php Client for Aliyun RocketMQ

License:MIT License


Languages

Language:C++ 75.6%Language:PHP 15.8%Language:Makefile 8.5%Language:Shell 0.1%