项目作者: moonrunwater

项目描述 :
aliyun-mq-python sdk
高级语言: C++
项目地址: git://github.com/moonrunwater/aliyun-mq-python.git
创建时间: 2019-04-19T06:24:19Z
项目社区:https://github.com/moonrunwater/aliyun-mq-python

开源协议:

下载


Aliyun MQ Python SDK

  • 适用于 aliyun rocketmq
  • aliyun rocketmq 基于开源的 rocketmq,进行了优化、调整,故不能直接使用 github 上的 apache/rocketmq-client-python
  • aliyun mq python sdk,通过 boost::python 库,将 aliyun mq c++ sdk 暴露为 python 可用的模块。
  • boost::python library is a framework for interfacing Python and C++. It allows you to quickly and seamlessly expose C++ classes functions and objects to Python, and vice-versa, using no special tools — just your C++ compiler.

Python Runtime Version

  • python 2.7.x
  • python 3.6.x, python 3.7.x

Dependency of Python Client

Build and Install

  1. # 适用于 centos7
  2. # 注: 须 cd 到 project 根目录下
  3. # use ons-cpp-v2.0.0-beta sdk
  4. # python2
  5. # sh install-v2.0.0-beta.sh 2
  6. # python3.6.x, 3.7.x
  7. sh install-v2.0.0-beta.sh 3

注: 若安装 python3 时没有将 python3 动态链接库 .so 编译出来(ldconfig -v | grep python 没有输出 libpython3.so -> libpython3.so), 还需执行 sh cp_ld_libpython.sh 3

Sample

  • sync producer

    1. python sample/test_producer.py
    2. python3 sample/test_producer.py
  • push consumer

    1. python sample/test_consumer.py
    2. python3 sample/test_consumer.py