You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2018/11/02 09:56:28 UTC

[GitHub] dongeforever closed pull request #1: [FEATURE REQUEST #462]Python Connector Over CPP SDK by Boost Python

dongeforever closed pull request #1: [FEATURE REQUEST #462]Python Connector Over CPP SDK by Boost Python
URL: https://github.com/apache/rocketmq-client-python/pull/1
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 0000000..c611e27
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,163 @@
+#/*
+#* Licensed to the Apache Software Foundation (ASF) under one or more
+#* contributor license agreements.  See the NOTICE file distributed with
+#* this work for additional information regarding copyright ownership.
+#* The ASF licenses this file to You under the Apache License, Version 2.0
+#* (the "License"); you may not use this file except in compliance with
+#* the License.  You may obtain a copy of the License at
+#*
+#*     http://www.apache.org/licenses/LICENSE-2.0
+#*
+#* Unless required by applicable law or agreed to in writing, software
+#* distributed under the License is distributed on an "AS IS" BASIS,
+#* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#* See the License for the specific language governing permissions and
+#* limitations under the License.
+#*/
+cmake_minimum_required(VERSION 2.6)
+
+# CMake complains if we don't have this.
+if (COMMAND cmake_policy)
+    cmake_policy(SET CMP0003 NEW)
+endif()
+
+# We're escaping quotes in the Windows version number, because
+# for some reason CMake won't do it at config version 2.4.7
+# It seems that this restores the newer behaviour where define
+# args are not auto-escaped.
+if (COMMAND cmake_policy)
+    cmake_policy(SET CMP0005 NEW)
+endif()
+
+# First, declare project (important for prerequisite checks).
+project(rocketmq-client-python)
+
+set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS ON)
+set(CMAKE_VERBOSE_MAKEFILE 1)
+
+# put binaries in a different dir to make them easier to find.
+set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
+set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
+
+# for unix, put debug files in a separate bin "debug" dir.
+# release bin files should stay in the root of the bin dir.
+# if (CMAKE_GENERATOR STREQUAL "Unix Makefiles")
+#     if (CMAKE_BUILD_TYPE STREQUAL Debug)
+#         set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin/debug)
+#         set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin/debug)
+#     endif()
+# endif()
+
+if(NOT CMAKE_BUILD_TYPE)
+  set(CMAKE_BUILD_TYPE "Release")
+endif()
+
+set(CXX_FLAGS
+ -g
+ -Wall
+ -Wno-deprecated
+ -fPIC
+ -fno-strict-aliasing
+ -Wno-unused-result
+ # -finline-limit=1000
+ # -Wextra
+ # -pedantic
+ # -pedantic-errors
+ # -D_FILE_OFFSET_BITS=64
+ # -DVALGRIND
+ # -DCHECK_PTHREAD_RETURN_VALUE
+ # -Werror
+ # -Wconversion
+ # -Wno-unused-parameter
+ # -Wunused-but-set-variable
+ # -Wold-style-cast
+ # -Woverloaded-virtual
+ # -Wpointer-arith
+ # -Wshadow
+ # -Wwrite-strings
+ # -Wdeprecated-declarations
+ # -march=native
+ # -MMD
+ # -std=c++0x
+ # -rdynamic
+ )
+
+if(CMAKE_BUILD_BITS EQUAL 32)
+  list(APPEND CXX_FLAGS "-m32")
+else() #not-condition
+  list(APPEND CXX_FLAGS "-m64")
+endif()
+
+string(REPLACE ";" " " CMAKE_CXX_FLAGS "${CXX_FLAGS}")
+# set(CMAKE_CXX_COMPILER "c++")
+set(CMAKE_CXX_FLAGS_DEBUG   "-O0 -DDEBUG")
+set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG")
+
+include("cmake/ConfigureChecks.cmake")
+
+# Declare deplibs, so we can use list in linker later. There's probably
+# a more elegant way of doing this; with SCons, when you check for the
+# lib, it is automatically passed to the linker.
+set(deplibs)
+
+# For some reason, the check_function_exists macro doesn't detect
+# the inet_aton on some pure Unix platforms (e.g. sunos5). So we
+# need to do a more detailed check and also include some extra deplibs.
+list(APPEND deplibs nsl)
+
+# pthread is used on both Linux and Mac
+check_library_exists("pthread" pthread_create "" HAVE_PTHREAD)
+if (HAVE_PTHREAD)
+    list(APPEND deplibs pthread)
+else()
+    message(FATAL_ERROR "Missing library: pthread")
+endif()
+
+check_library_exists(dl dlopen "" HAVE_LIBDL)
+if(HAVE_LIBDL)
+    list(APPEND deplibs dl)
+else() #not-HAVE_LIBDL
+    message(FATAL_ERROR "Missing library: dl")
+endif()
+
+list(APPEND deplibs rt)
+
+check_library_exists(z compress2 "" HAVE_LIBZ)
+if(HAVE_LIBZ)
+    list(APPEND deplibs z)
+else() #not-HAVE_LIBZ
+    message(FATAL_ERROR "Missing library: z")
+endif()
+
+# rocketmq is used on both Linux and Mac
+check_library_exists("rocketmq" CreateMessage "" HAVE_PTHREAD)
+if (HAVE_PTHREAD)
+    list(APPEND deplibs rocketmq)
+else()
+    message(FATAL_ERROR "Missing library: pthread")
+endif()
+# add include dir for bsd (posix uses /usr/include/)
+set(CMAKE_INCLUDE_PATH "${CMAKE_INCLUDE_PATH}:/usr/local/include")
+
+# For config.h, set some static values; it may be a good idea to make
+# these values dynamic for non-standard UNIX compilers.
+set(ACCEPT_TYPE_ARG3 socklen_t)
+set(HAVE_CXX_BOOL 1)
+set(HAVE_CXX_CASTS 1)
+set(HAVE_CXX_EXCEPTIONS 1)
+set(HAVE_CXX_MUTABLE 1)
+set(HAVE_CXX_STDLIB 1)
+set(HAVE_PTHREAD_SIGNAL 1)
+set(SELECT_TYPE_ARG1 int)
+set(SELECT_TYPE_ARG234 "(fd_set *)")
+set(SELECT_TYPE_ARG5 "(struct timeval *)")
+set(STDC_HEADERS 1)
+set(TIME_WITH_SYS_TIME 1)
+set(HAVE_SOCKLEN_T 1)
+
+# For config.h, save the results based on a template (config.h.in).
+# configure_file(res/config.h.in ${root_dir}/config.h)
+
+# add_definitions(-DSYSAPI_UNIX=1 -DHAVE_CONFIG_H)
+
+add_subdirectory(project)
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..0130891
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,201 @@
+ Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (properties) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
\ No newline at end of file
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..6fc2d70
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,49 @@
+#/*
+#* Licensed to the Apache Software Foundation (ASF) under one or more
+#* contributor license agreements.  See the NOTICE file distributed with
+#* this work for additional information regarding copyright ownership.
+#* The ASF licenses this file to You under the Apache License, Version 2.0
+#* (the "License"); you may not use this file except in compliance with
+#* the License.  You may obtain a copy of the License at
+#*
+#*     http://www.apache.org/licenses/LICENSE-2.0
+#*
+#* Unless required by applicable law or agreed to in writing, software
+#* distributed under the License is distributed on an "AS IS" BASIS,
+#* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#* See the License for the specific language governing permissions and
+#* limitations under the License.
+#*/
+
+LIBS_ORIG := $(patsubst %/,%, $(dir $(wildcard libs/*/Makefile)))
+LIBS_CLEAN := $(addsuffix -clean,$(LIBS_ORIG))
+
+.PHONY: $(LIBS_CLEAN)
+
+all: build-shared
+
+build-libs: $(LIBS_ORIG)
+
+$(LIBS_ORIG):
+	$(MAKE) -C $@
+
+build-shared:
+	$(MAKE) -C project
+
+test:
+	@echo $(LIBS_ORIG)
+
+# clean:$(LIBS_CLEAN)
+clean:
+	$(MAKE) -C project clean
+	$(MAKE) -C bin clean
+	$(RM) -rf  logs/*.log
+	$(RM) -rf  tmp
+
+cleanall:$(LIBS_CLEAN) clean
+
+install:
+	$(MAKE) -C project install
+
+$(LIBS_CLEAN):
+	$(MAKE) -C $(@:-clean=) clean
diff --git a/README.md b/README.md
index 1a572f5..deed114 100644
--- a/README.md
+++ b/README.md
@@ -1 +1,36 @@
-# rocketmq-client-python
+## RocketMQ Client Python [![License](https://img.shields.io/badge/license-Apache%202-4EB1BA.svg)](https://www.apache.org/licenses/LICENSE-2.0.html)
+
+* RocketMQ Python client is developed on top of [rocketmq-client-cpp](https://github.com/apache/rocketmq-client-cpp), which has been proven robust and widely adopted within Alibaba Group by many business units for more than three years.
+
+----------
+## Features
+At present, this SDK supports
+* sending message in synchronous mode
+* consuming message using push model
+
+----------
+## How to use
+* Step-by-step instruction are provided in [RocketMQ Client Python Introduction](https://github.com/apache/rocketmq-client-python/doc/Introduction.md)
+* Consult [RocketMQ Quick Start](https://rocketmq.apache.org/docs/quick-start/) to setup rocketmq broker and nameserver.
+
+----------
+## Apache RocketMQ Community
+* [RocketMQ Community Projects](https://github.com/apache/rocketmq-externals)
+
+----------
+## Contact us
+* Mailing Lists: <https://rocketmq.apache.org/about/contact/>
+* Home: <https://rocketmq.apache.org>
+* Docs: <https://rocketmq.apache.org/docs/quick-start/>
+* Issues: <https://github.com/apache/rocketmq-client-python/issues>
+* Ask: <https://stackoverflow.com/questions/tagged/rocketmq>
+* Slack: <https://rocketmq-community.slack.com/>
+ 
+---------- 
+## How to Contribute
+  Contributions are warmly welcome! Be it trivial cleanup, major new feature or other suggestion. Read this [how to contribute](http://rocketmq.apache.org/docs/how-to-contribute/) guide for more details. 
+   
+   
+----------
+## License
+  [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.html) Copyright (C) Apache Software Foundation
diff --git a/bin/Makefile b/bin/Makefile
new file mode 100644
index 0000000..f850c19
--- /dev/null
+++ b/bin/Makefile
@@ -0,0 +1,27 @@
+#/*
+#* Licensed to the Apache Software Foundation (ASF) under one or more
+#* contributor license agreements.  See the NOTICE file distributed with
+#* this work for additional information regarding copyright ownership.
+#* The ASF licenses this file to You under the Apache License, Version 2.0
+#* (the "License"); you may not use this file except in compliance with
+#* the License.  You may obtain a copy of the License at
+#*
+#*     http://www.apache.org/licenses/LICENSE-2.0
+#*
+#* Unless required by applicable law or agreed to in writing, software
+#* distributed under the License is distributed on an "AS IS" BASIS,
+#* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#* See the License for the specific language governing permissions and
+#* limitations under the License.
+#*/
+
+clean:
+	$(RM) -rf *_d.*
+	$(RM) -rf core
+	$(RM) -rf *.exp*
+	$(RM) -rf *.pdb*
+	$(RM) -rf *Producer.lib*
+	$(RM) -rf *RocketMQClient.dll*
+	$(RM) -rf *RocketMQClient.lib*
+	$(RM) -rf *pushConsumer.lib*
+	$(RM) -rf *.a *.so
diff --git a/changelog b/changelog
new file mode 100755
index 0000000..e474814
--- /dev/null
+++ b/changelog
@@ -0,0 +1,7 @@
+version 1.0.0 @2018.10.16
+ * Initialize version of python client.
+ * Export python APIs Based on CPP SDK using boost-python.
+ * Support sending message in synchronous mode.
+ * Support consuming message using push model.
+ * Support python 2.7.X under linux platform.
+
diff --git a/cmake/ConfigureChecks.cmake b/cmake/ConfigureChecks.cmake
new file mode 100644
index 0000000..fdca98d
--- /dev/null
+++ b/cmake/ConfigureChecks.cmake
@@ -0,0 +1,358 @@
+
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+include(CheckIncludeFiles)
+include(CheckFunctionExists)
+include(CheckLibraryExists)
+include(CheckSymbolExists)
+include(CheckTypeSize)
+include(CheckCSourceCompiles)
+include(CheckCXXSourceCompiles)
+
+check_include_files(dlfcn.h  HAVE_DLFCN_H )
+
+check_include_files(errno.h       HAVE_ERRNO_H )
+check_include_files(iconv.h       HAVE_ICONV_H )
+check_include_files(limits.h      HAVE_LIMITS_H )
+check_include_files(sys/types.h   HAVE_SYS_TYPES_H )
+check_include_files("sys/types.h;sys/socket.h"  HAVE_SYS_SOCKET_H )
+check_include_files(sys/syscall.h HAVE_SYS_SYSCALL_H )
+check_include_files("sys/types.h;sys/time.h"    HAVE_SYS_TIME_H )
+check_include_files("sys/types.h;sys/timeb.h"   HAVE_SYS_TIMEB_H )
+check_include_files("sys/types.h;sys/stat.h"    HAVE_SYS_STAT_H )
+check_include_files(sys/file.h    HAVE_SYS_FILE_H )
+check_include_files(syslog.h      HAVE_SYSLOG_H )
+check_include_files(arpa/inet.h   HAVE_ARPA_INET_H )
+check_include_files(netinet/in.h  HAVE_NETINET_IN_H )
+check_include_files("sys/types.h;netinet/tcp.h" HAVE_NETINET_TCP_H )
+check_include_files(netdb.h       HAVE_NETDB_H )
+check_include_files(unistd.h      HAVE_UNISTD_H )
+check_include_files(fcntl.h       HAVE_FCNTL_H )
+check_include_files(stdio.h       HAVE_STDIO_H )
+check_include_files(stdarg.h      HAVE_STDARG_H )
+check_include_files(stdlib.h      HAVE_STDLIB_H )
+check_include_files(time.h        HAVE_TIME_H )
+check_include_files(wchar.h       HAVE_WCHAR_H )
+check_include_files(poll.h        HAVE_POLL_H )
+
+
+check_include_files(inttypes.h    HAVE_INTTYPES_H )
+check_include_files(memory.h      HAVE_MEMORY_H )
+check_include_files(stdint.h      HAVE_STDINT_H )
+check_include_files(strings.h     HAVE_STRINGS_H )
+check_include_files(string.h      HAVE_STRING_H )
+
+
+check_include_files("stdlib.h;stdio.h;stdarg.h;string.h;float.h" STDC_HEADERS )
+
+find_library(LIBADVAPI32 advapi32)
+find_library(LIBKERNEL32 kernel32)
+find_library(LIBNSL      nsl)
+find_library(LIBRT       rt)
+find_library(LIBICONV iconv)
+find_library(LIBPOSIX4 posix4)
+find_library(LIBCPOSIX cposix)
+find_library(LIBSOCKET socket)
+find_library(LIBWS2_32 ws2_32)
+
+check_function_exists(gmtime_r      HAVE_GMTIME_R )
+check_function_exists(localtime_r   HAVE_LOCALTIME_R )
+check_function_exists(gettimeofday  HAVE_GETTIMEOFDAY )
+check_function_exists(getpid        HAVE_GETPID )
+check_function_exists(poll          HAVE_POLL )
+check_function_exists(pipe          HAVE_PIPE )
+check_function_exists(pipe2         HAVE_PIPE2 )
+check_function_exists(ftime         HAVE_FTIME )
+check_function_exists(stat          HAVE_STAT )
+check_function_exists(lstat         HAVE_LSTAT )
+check_function_exists(fcntl         HAVE_FCNTL )
+check_function_exists(lockf         HAVE_FLOCK )
+check_function_exists(flock         HAVE_LOCKF )
+check_function_exists(htons         HAVE_HTONS )
+check_function_exists(ntohs         HAVE_NTOHS )
+check_function_exists(htonl         HAVE_HTONL )
+check_function_exists(ntohl         HAVE_NTOHL )
+check_function_exists(shutdown      HAVE_SHUTDOWN )
+check_function_exists(vsnprintf     HAVE_VSNPRINTF )
+check_function_exists(_vsnprintf    HAVE__VSNPRINTF )
+check_function_exists(vsprintf_s    HAVE_VSPRINTF_S )
+check_function_exists(vswprintf_s   HAVE_VSWPRINTF_S )
+check_function_exists(vfprintf_s    HAVE_VFPRINTF_S )
+check_function_exists(vfwprintf_s   HAVE_VFWPRINTF_S )
+check_function_exists(_vsnprintf_s  HAVE__VSNPRINTF_S )
+check_function_exists(_vsnwprintf_s HAVE__VSNWPRINTF_S )
+check_function_exists(mbstowcs      HAVE_MBSTOWCS )
+check_function_exists(wcstombs      HAVE_WCSTOMBS )
+
+
+check_symbol_exists(ENAMETOOLONG          errno.h       HAVE_ENAMETOOLONG )
+check_symbol_exists(SYS_gettid            sys/syscall.h HAVE_GETTID )
+check_symbol_exists(__FUNCTION__          ""            HAVE_FUNCTION_MACRO )
+check_symbol_exists(__PRETTY_FUNCTION__   ""            HAVE_PRETTY_FUNCTION_MACRO )
+check_symbol_exists(__func__              ""            HAVE_FUNC_SYMBOL )
+
+check_c_source_compiles("#include <stdlib.h> \n int main() { int x = 1; int y = __sync_add_and_fetch (&x, 1); return y;}"
+                        HAVE___SYNC_ADD_AND_FETCH )
+
+check_c_source_compiles("#include <stdlib.h> \n int main() { int x = 1; int y = __sync_sub_and_fetch (&x, 1); return y;}"
+                        HAVE___SYNC_SUB_AND_FETCH )
+
+check_c_source_compiles("#include <stdio.h>\n #define MACRO(buf, args...) (sprintf (buf, \"%d\", args))\n int main() {char a[10]; MACRO(a, 1); return 0; }"
+                        HAVE_GNU_VARIADIC_MACROS )
+
+check_c_source_compiles("#include <stdio.h>\n #define MACRO(buf, ...) (sprintf (buf, \"%d\",  __VA_ARGS__))\n int main() {char a[10]; MACRO(a, 1); return 0; }"
+                        HAVE_C99_VARIADIC_MACROS )
+
+
+# clock_gettime() needs -lrt here
+# TODO AC says this exists
+if (LIBRT)
+  check_library_exists("${LIBRT}" clock_gettime ""
+    HAVE_CLOCK_GETTIME )
+  check_library_exists("${LIBRT}" clock_nanosleep ""
+    HAVE_CLOCK_NANOSLEEP )
+  check_library_exists("${LIBRT}" nanosleep ""
+    HAVE_NANOSLEEP )
+else ()
+  check_function_exists(clock_gettime HAVE_CLOCK_GETTIME )
+  check_function_exists(clock_nanosleep HAVE_CLOCK_NANOSLEEP )
+  check_function_exists(nanosleep HAVE_NANOSLEEP )
+endif ()
+
+# iconv functions may require iconv library (on OS X for example)
+if(WITH_ICONV)
+  if(LIBICONV)
+    check_library_exists("${LIBICONV}" iconv_open  "" HAVE_ICONV_OPEN )
+    check_library_exists("${LIBICONV}" iconv_close "" HAVE_ICONV_CLOSE )
+    check_library_exists("${LIBICONV}" iconv       "" HAVE_ICONV )
+  else()
+    check_function_exists(iconv_open  HAVE_ICONV_OPEN )
+    check_function_exists(iconv_close HAVE_ICONV_CLOSE )
+    check_function_exists(iconv       HAVE_ICONV )
+  endif()
+endif()
+
+check_function_exists(gethostbyname_r HAVE_GETHOSTBYNAME_R) # TODO more complicated test in AC
+check_function_exists(getaddrinfo     HAVE_GETADDRINFO ) # TODO more complicated test in AC
+
+
+# check for declspec stuff
+if(NOT DEFINED LOG4CPLUS_DECLSPEC_EXPORT)
+  check_c_source_compiles(
+    "#if defined (__GNUC__) && (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ <= 1))
+     # error Please fail.
+     #endif
+
+     __attribute__((visibility(\"default\"))) int x = 0;
+     __attribute__((visibility(\"default\"))) int foo();
+     int foo() { return 0; }
+     __attribute__((visibility(\"default\"))) int bar() { return x; }
+     __attribute__((visibility(\"hidden\"))) int baz() { return 1; }
+
+     int main(void) { return 0; }"
+   HAVE_ATTRIBUTE_VISIBILITY
+  )
+  if(HAVE_ATTRIBUTE_VISIBILITY)
+    set(LOG4CPLUS_DECLSPEC_EXPORT "__attribute__ ((visibility(\"default\")))" )
+    set(LOG4CPLUS_DECLSPEC_IMPORT "__attribute__ ((visibility(\"default\")))" )
+    set(LOG4CPLUS_DECLSPEC_PRIVATE "__attribute__ ((visibility(\"hidden\")))" )
+  endif()
+endif()
+
+if(NOT DEFINED LOG4CPLUS_DECLSPEC_EXPORT)
+  check_c_source_compiles(
+    "#if defined (__clang__)
+     // Here the problem is that Clang only warns that it does not support
+     // __declspec(dllexport) but still compiles the executable.
+     # error Please fail.
+     #endif
+
+     __declspec(dllexport) int x = 0;
+     __declspec(dllexport) int foo ();
+     int foo () { return 0; }
+     __declspec(dllexport) int bar () { return x; }
+
+     int main(void) { return 0; }"
+    HAVE_DECLSPEC_DLLEXPORT
+  )
+  if(HAVE_DECLSPEC_DLLEXPORT)
+    set(LOG4CPLUS_DECLSPEC_EXPORT "__declspec(dllexport)" )
+    set(LOG4CPLUS_DECLSPEC_IMPORT "__declspec(dllimport)" )
+    set(LOG4CPLUS_DECLSPEC_PRIVATE "" )
+  endif()
+endif()
+
+if(NOT DEFINED LOG4CPLUS_DECLSPEC_EXPORT)
+  check_c_source_compiles(
+    "__global int x = 0;
+     __global int foo();
+     int foo() { return 0; }
+     __global int bar() { return x; }
+     __hidden int baz() { return 1; }
+
+     int main(void) { return 0; }"
+    HAVE_GLOBAL_AND_HIDDEN
+  )
+  if(HAVE_GLOBAL_AND_HIDDEN)
+    set(LOG4CPLUS_DECLSPEC_EXPORT "__global" )
+    set(LOG4CPLUS_DECLSPEC_IMPORT "__global" )
+    set(LOG4CPLUS_DECLSPEC_PRIVATE "__hidden" )
+  endif()
+endif()
+
+if(NOT DEFINED LOG4CPLUS_DECLSPEC_EXPORT OR NOT ENABLE_SYMBOLS_VISIBILITY)
+  set(LOG4CPLUS_DECLSPEC_EXPORT "")
+  set(LOG4CPLUS_DECLSPEC_IMPORT "")
+  set(LOG4CPLUS_DECLSPEC_PRIVATE "")
+endif()
+
+# check for thread-local stuff
+if(NOT DEFINED LOG4CPLUS_HAVE_TLS_SUPPORT)
+  # TODO: requires special compiler switch on GCC and Clang
+  # Currently it is assumed that they are provided in
+  # CMAKE_CXX_FLAGS
+  set(CMAKE_REQUIRED_FLAGS "${CMAKE_CXX_FLAGS}")
+  check_cxx_source_compiles(
+    "extern thread_local int x;
+     thread_local int * ptr = 0;
+     int foo() { ptr = &x; return x; }
+     thread_local int x = 1;
+
+     int main()
+     {
+         x = 2;
+         foo();
+         return 0;
+     }"
+    HAVE_CXX11_THREAD_LOCAL
+  )
+  set(CMAKE_REQUIRED_FLAGS "")
+  if(HAVE_CXX11_THREAD_LOCAL)
+    set(LOG4CPLUS_HAVE_TLS_SUPPORT 1)
+    set(LOG4CPLUS_THREAD_LOCAL_VAR "thread_local")
+  endif()
+endif()
+
+if(NOT DEFINED LOG4CPLUS_HAVE_TLS_SUPPORT)
+  check_cxx_source_compiles(
+    "#if defined (__NetBSD__)
+     #include <sys/param.h>
+     #if ! __NetBSD_Prereq__(5,1,0)
+     #error NetBSD __thread support does not work before 5.1.0. It is missing __tls_get_addr.
+     #endif
+     #endif
+
+     extern __thread int x;
+     __thread int * ptr = 0;
+     int foo() { ptr = &x; return x; }
+     __thread int x = 1;
+
+     int main()
+     {
+         x = 2;
+         foo();
+         return 0;
+     }"
+    HAVE_GCC_THREAD_EXTENSION
+  )
+  if(HAVE_GCC_THREAD_EXTENSION)
+    set(LOG4CPLUS_HAVE_TLS_SUPPORT 1)
+    set(LOG4CPLUS_THREAD_LOCAL_VAR "__thread")
+  endif()
+endif()
+
+if(NOT DEFINED LOG4CPLUS_HAVE_TLS_SUPPORT)
+  check_cxx_source_compiles(
+    "#if defined (__GNUC__)
+     #error Please fail.
+     #endif
+
+     extern __declspec(thread) int x;
+     __declspec(thread) int * ptr = 0;
+     int foo() { ptr = &x; return x; }
+     __declspec(thread) int x = 1;
+
+     int main()
+     {
+         x = 2;
+         foo();
+         return 0;
+     }"
+    HAVE_DECLSPEC_THREAD
+  )
+  if(HAVE_DECLSPEC_THREAD)
+    set(LOG4CPLUS_HAVE_TLS_SUPPORT 1)
+    set(LOG4CPLUS_THREAD_LOCAL_VAR "__declspec(thread)")
+  endif()
+endif()
+
+# check for c++11 atomic stuff
+# TODO: requires special compiler switch on GCC and Clang
+# Currently it is assumed that they are provided in
+# CMAKE_CXX_FLAGS
+set(CMAKE_REQUIRED_FLAGS "${CMAKE_CXX_FLAGS}")
+check_cxx_source_compiles(
+  "#include <atomic>
+
+   template<typename T>
+   void test_atomic()
+   {
+       std::atomic<T> x(0);
+       std::atomic_fetch_add_explicit(&x, static_cast<T>(1), std::memory_order_acquire);
+       std::atomic_fetch_sub_explicit(&x, static_cast<T>(1), std::memory_order_release);
+   }
+
+   int main()
+   {
+       test_atomic<int>();
+       test_atomic<unsigned int>();
+       test_atomic<long>();
+       test_atomic<unsigned long>();
+       std::atomic_thread_fence(std::memory_order_acquire);
+       return 0;
+   }"
+  LOG4CPLUS_HAVE_CXX11_ATOMICS
+)
+set(CMAKE_REQUIRED_FLAGS "")
+
+set(CMAKE_EXTRA_INCLUDE_FILES sys/socket.h)
+check_type_size(socklen_t _SOCKLEN_SIZE)
+if (_SOCKLEN_SIZE)
+  set(socklen_t)
+else()
+  set(socklen_t TRUE)
+endif()
+
+macro(PATH_TO_HAVE _pathVar )
+  if (${_pathVar})
+    set(HAVE_${_pathVar} TRUE)
+  else ()
+    set(HAVE_${_pathVar} FALSE)
+  endif ()
+endmacro()
+
+
+path_to_have(LIBADVAPI32)
+path_to_have(LIBKERNEL32)
+path_to_have(LIBNSL)
+path_to_have(LIBRT)
+path_to_have(LIBPOSIX4)
+path_to_have(LIBCPOSIX)
+path_to_have(LIBSOCKET)
+path_to_have(LIBWS2_32)
+
+
+
diff --git a/doc/Introduction.md b/doc/Introduction.md
new file mode 100644
index 0000000..24b55c2
--- /dev/null
+++ b/doc/Introduction.md
@@ -0,0 +1,89 @@
+----------
+## How to build
+
+#### 1. Python Version
+* Support python 2.7.X
+
+
+#### 2. Dependency Installation
+* Install libevent 2.0.22 dependency
+    - Download [libevent 2.0.22](https://github.com/libevent/libevent/releases/download/release-2.0.22-stable/libevent-2.0.22-stable.tar.gz)
+    - Build and install libevent
+	   - ./configure
+	   - make
+	   - make install 
+* Install JsonCPP 0.10.6 dependency
+    - Download [jsoncpp 0.10.6](https://github.com/open-source-parsers/jsoncpp/archive/0.10.6.zip)
+    - Build and install jsoncpp
+  	     - cmake .
+  	     - make
+  	     - make install
+* Install boost 1.56.0 dependency
+	 - Download [boost 1.53.0](http://www.boost.org/users/history/version_1_53_0.html)
+	 - Build and install boost
+	   - cd path/to/boost_1_53_0
+	   - config boost:./bootstrap.sh
+	   - build boost:     
+	       - build static boost lib: ./b2 link=static runtime-link=static
+	       - build dynamic boost lib: ./b2 link=shared runtime-link=shared
+	   -  install boost: ./b2 install
+* Install librocketmq dependency
+    - Download [librocketmq](https://github.com/apache/rocketmq-client-cpp)
+    - Build and install librocketmq
+	   - make
+	   - make install 	
+* Install Boost-python 1.53.0 dependency
+    - install boost-python
+      
+#### 3. Make and Install
+* Default install path:
+    - header files: /usr/local/include/
+    - lib: /usr/local/lib
+* Make and install using make
+    - make
+    - make install
+	
+#### 4. Check verion
+- strings librocketmqclientpython.so |grep PYTHON_CLIENT_VERSION
+
+----------
+## Best practice
+
+- create message by following interface:
+  - msg = CreateMessage("your_topic.")
+  - SetMessageBody(msg, "this_message_body.")
+  - SetMessageKeys(msg, "this_message_keys.")
+  - SetMessageTags(msg, "this_message_tag.")
+  
+- producer must invoke following interface:
+  - producer =CreateProducer("please_rename_unique_group_name");
+  - SetProducerNameServerAddress(producer,"please_rename_unique_name_server")
+  - StartProducer(producer)
+  - SendMessageSync(producer,msg)
+  - ShutdownProducer(producer)
+  - DestroyProducer(producer)
+
+- how to consumer meaasges
+  - def consumerMessage(msg):
+  - topic = GetMessageTopic(msg)
+  - body = GetMessageBody(msg)
+  - tags = GetMessageTags(msg)
+  - msgid = GetMessageId(msg)
+  - handle message
+  - return 0
+
+- pushconsumer must invoke following interface:
+  - consumer =CreatePushConsumer("please_rename_unique_group_name_1");
+  - SetPushConsumerNameServerAddress(consumer,"please_rename_unique_name_server")
+  - Subscribe(consumer, "your_topic", "*")
+  - RegisterMessageCallback(consumer,consumerMessage)
+  - StartPushConsumer(consumer)
+  - ShutdownPushConsumer(consumer)
+  - DestroyPushConsumer(consumer)
+
+----------
+## Demo
+- sync producer
+  - python testProducer.py
+- push consumer
+  - python testConsumer.py
\ No newline at end of file
diff --git a/project/CMakeLists.txt b/project/CMakeLists.txt
new file mode 100644
index 0000000..9e86bcd
--- /dev/null
+++ b/project/CMakeLists.txt
@@ -0,0 +1,55 @@
+#/*
+#* Licensed to the Apache Software Foundation (ASF) under one or more
+#* contributor license agreements.  See the NOTICE file distributed with
+#* this work for additional information regarding copyright ownership.
+#* The ASF licenses this file to You under the Apache License, Version 2.0
+#* (the "License"); you may not use this file except in compliance with
+#* the License.  You may obtain a copy of the License at
+#*
+#*     http://www.apache.org/licenses/LICENSE-2.0
+#*
+#* Unless required by applicable law or agreed to in writing, software
+#* distributed under the License is distributed on an "AS IS" BASIS,
+#* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#* See the License for the specific language governing permissions and
+#* limitations under the License.
+#*/
+# source files
+project(rocketmqclientpython)
+
+file(GLOB_RECURSE SRC_FILES   ${CMAKE_SOURCE_DIR}/src/*)
+
+# subdirs
+SET(SUB_DIRS)
+file(GLOB children ${CMAKE_SOURCE_DIR}/src/*)
+FOREACH(child ${children})
+	IF(IS_DIRECTORY ${child})
+	    LIST(APPEND SUB_DIRS ${child})
+	ENDIF()
+ENDFOREACH()
+LIST(APPEND SUB_DIRS ${CMAKE_SOURCE_DIR}/src)
+
+# include_directories
+include_directories(${CMAKE_SOURCE_DIR}/include)
+include_directories(${SUB_DIRS})
+
+# static
+add_library(rocketmqclientpython_static STATIC ${SRC_FILES})
+set_target_properties(rocketmqclientpython_static PROPERTIES OUTPUT_NAME "rocketmqclientpython")
+#add_dependencies(rocketmqclientpython_static)
+target_link_libraries(rocketmqclientpython_static ${deplibs})
+target_link_libraries(rocketmqclientpython_static)
+
+# shared
+set(CMAKE_SHARED_LINKER_FLAGS "-fPIC -shared")
+add_library(rocketmqclientpython_shared SHARED ${SRC_FILES})
+set_target_properties(rocketmqclientpython_shared PROPERTIES OUTPUT_NAME "rocketmqclientpython")
+#add_dependencies(rocketmqclientpython_shared)
+target_link_libraries(rocketmqclientpython_shared ${deplibs})
+target_link_libraries(rocketmqclientpython_shared)
+
+# install
+install (TARGETS   rocketmqclientpython_static             DESTINATION bin)
+install (DIRECTORY ${CMAKE_SOURCE_DIR}/include/ DESTINATION include)
+install (DIRECTORY ${CMAKE_SOURCE_DIR}/doc/     DESTINATION doc)
+
diff --git a/project/Makefile b/project/Makefile
new file mode 100755
index 0000000..c43749a
--- /dev/null
+++ b/project/Makefile
@@ -0,0 +1,98 @@
+#/*
+#* Licensed to the Apache Software Foundation (ASF) under one or more
+#* contributor license agreements.  See the NOTICE file distributed with
+#* this work for additional information regarding copyright ownership.
+#* The ASF licenses this file to You under the Apache License, Version 2.0
+#* (the "License"); you may not use this file except in compliance with
+#* the License.  You may obtain a copy of the License at
+#*
+#*     http://www.apache.org/licenses/LICENSE-2.0
+#*
+#* Unless required by applicable law or agreed to in writing, software
+#* distributed under the License is distributed on an "AS IS" BASIS,
+#* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#* See the License for the specific language governing permissions and
+#* limitations under the License.
+#*/
+
+##====================================================================
+# make release=0 debug版。
+# make release=1 release版。
+CXXFLAGS = -g -pthread -Wall -fPIC -Wno-deprecated -fno-strict-aliasing -fno-omit-frame-pointer -O0 -DNDEBUG
+
+ifeq ($(shell uname -m),x86_64)
+	CXXFLAGS += -m64
+else
+	CXXFLAGS += -m32
+endif
+
+##====================================================================
+PREFIX:=/usr/local
+TOPDIR := ..
+STATIC_TARGET := $(TOPDIR)/bin/librocketmqclientpython.a
+SHARED_TARGET := $(TOPDIR)/bin/librocketmqclientpython.so
+SRCDIR:=$(TOPDIR)/src
+INCFILES:=$(wildcard $(TOPDIR)/include/*.h)
+CPP_SRCDIR := $(SRCDIR)
+
+CPP_SRC := $(foreach dir,$(CPP_SRCDIR), $(wildcard $(dir)/*.cpp))
+STATIC_OBJ := $(filter-out %/dllmain.o,$(patsubst %.cpp, %.o, $(CPP_SRC)))
+SHARED_OBJ := $(filter-out %/dllmain.lo,$(patsubst %.cpp, %.lo, $(CPP_SRC)))
+VPATH:=$(CPP_SRCDIR)
+
+PYTHON_INCLUDE:=/usr/include/python2.7
+ROCKETMQ_INCLUDE:=/usr/local/include/rocketmq
+PYTHON_LIB:=/usr/python/bin
+PYTHON_LIBD:=/usr/python/lib
+ROCKETMQ_LIBD:=/usr/local/lib
+CPPFLAGS := -I$(TOPDIR)/include \
+		    $(addprefix -I,$(CPP_SRCDIR)) \
+		    $(addprefix -I,$(ROCKETMQ_INCLUDE)) \
+			$(addprefix -I,$(PYTHON_INCLUDE))
+
+LDFLAGS := -shared -Wl,-soname=librocketmqclientpython.so -pthread -fPIC
+LIBPATH := $(addprefix -L, $(ROCKETMQ_LIBD) $(PYTHON_LIBD))
+LDLIBS := $(addprefix -l,rocketmq boost_python python2.7)
+
+CXX := g++
+AR := ar
+ARFLAGS := rcs
+LIBS:= $(foreach dir,$(ROCKETMQ_LIBD),$(wildcard $(dir)/*/lib/*.a))
+##====================================================================
+#include     tool.mak
+##====================================================================
+all:build-static  build-shared
+
+build-static:$(STATIC_TARGET)
+
+build-shared:$(SHARED_TARGET)
+
+$(STATIC_TARGET):$(STATIC_OBJ) $(LIBS)
+
+$(SHARED_TARGET):$(SHARED_OBJ)
+	$(CXX) $(LDFLAGS) -o $@ $^ $(LIBPATH) $(LDLIBS)
+
+%.o:%.cpp
+	$(CXX) -c $(CXXFLAGS) $(CPPFLAGS) -o $@ $<
+
+%.lo:%.cpp
+	$(CXX) -c $(CXXFLAGS) $(CPPFLAGS) -o $@ $<
+
+rebuild:clean build
+
+test:
+	@echo $(LIBS)
+
+clean:
+	$(RM) -rf $(STATIC_OBJ)
+	$(RM) -rf $(SHARED_OBJ)
+	$(RM) -rf  ipch  *.sdf *.opensdf *.user *.suo
+
+install: $(STATIC_TARGET) $(SHARED_TARGET)
+	mkdir -p $(PREFIX)/lib
+	rm -rf $(PREFIX)/lib/librocketmqclientpython.a
+	rm -rf $(PREFIX)/lib/librocketmqclientpython.so
+	#cp -rf $(STATIC_TARGET) $(PREFIX)/lib/
+	cp -rf $(SHARED_TARGET) $(PREFIX)/lib/
+	@echo
+	@echo 'Install succeed, target directory is "'$(PREFIX)'".'
diff --git a/project/tool.mak b/project/tool.mak
new file mode 100644
index 0000000..6bbbb5c
--- /dev/null
+++ b/project/tool.mak
@@ -0,0 +1,38 @@
+#/*
+#* Licensed to the Apache Software Foundation (ASF) under one or more
+#* contributor license agreements.  See the NOTICE file distributed with
+#* this work for additional information regarding copyright ownership.
+#* The ASF licenses this file to You under the Apache License, Version 2.0
+#* (the "License"); you may not use this file except in compliance with
+#* the License.  You may obtain a copy of the License at
+#*
+#*     http://www.apache.org/licenses/LICENSE-2.0
+#*
+#* Unless required by applicable law or agreed to in writing, software
+#* distributed under the License is distributed on an "AS IS" BASIS,
+#* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#* See the License for the specific language governing permissions and
+#* limitations under the License.
+#*/
+
+define BUILD_LIBRARY
+$(if $(wildcard $@),@$(RM) $@)
+$(if $(wildcard ar.mac),@$(RM) ar.mac)
+$(if $(filter %.a, $^),
+@echo CREATE $@ > ar.mac
+@echo SAVE >> ar.mac
+@echo END >> ar.mac
+@$(AR) -M < ar.mac
+)
+$(if $(filter %.o,$^),@$(AR) -q $@ $(filter %.o, $^))
+$(if $(filter %.a, $^),
+@echo OPEN $@ > ar.mac
+$(foreach LIB, $(filter %.a, $^),
+@echo ADDLIB $(LIB) >> ar.mac
+)
+@echo SAVE >> ar.mac
+@echo END >> ar.mac
+@$(AR) -M < ar.mac
+@$(RM) ar.mac
+)
+endef
diff --git a/sample/__init__.py b/sample/__init__.py
new file mode 100644
index 0000000..6cf9b1e
--- /dev/null
+++ b/sample/__init__.py
@@ -0,0 +1,22 @@
+#/*
+#* Licensed to the Apache Software Foundation (ASF) under one or more
+#* contributor license agreements.  See the NOTICE file distributed with
+#* this work for additional information regarding copyright ownership.
+#* The ASF licenses this file to You under the Apache License, Version 2.0
+#* (the "License"); you may not use this file except in compliance with
+#* the License.  You may obtain a copy of the License at
+#*
+#*     http://www.apache.org/licenses/LICENSE-2.0
+#*
+#* Unless required by applicable law or agreed to in writing, software
+#* distributed under the License is distributed on an "AS IS" BASIS,
+#* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#* See the License for the specific language governing permissions and
+#* limitations under the License.
+#*/
+
+import sys
+sys.path.append('/usr/local/lib')
+print("__________Python Version:___________")
+print(sys.version)
+print("______Add Path /usr/local/lib_______")
diff --git a/sample/base.py b/sample/base.py
new file mode 100644
index 0000000..6cb4f48
--- /dev/null
+++ b/sample/base.py
@@ -0,0 +1,49 @@
+#/*
+#* Licensed to the Apache Software Foundation (ASF) under one or more
+#* contributor license agreements.  See the NOTICE file distributed with
+#* this work for additional information regarding copyright ownership.
+#* The ASF licenses this file to You under the Apache License, Version 2.0
+#* (the "License"); you may not use this file except in compliance with
+#* the License.  You may obtain a copy of the License at
+#*
+#*     http://www.apache.org/licenses/LICENSE-2.0
+#*
+#* Unless required by applicable law or agreed to in writing, software
+#* distributed under the License is distributed on an "AS IS" BASIS,
+#* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#* See the License for the specific language governing permissions and
+#* limitations under the License.
+#*/
+
+import __init__
+from librocketmqclientpython import *
+ 
+def initProducer(name):
+    print("---------Create Producer---------------")
+    producer =CreateProducer(name)
+    SetProducerNameServerAddress(producer,"172.17.0.5:9876")
+    StartProducer(producer)
+    return producer
+
+def testSendMssage(producer,topic,key,body):
+    print("Starting Sending.....")
+    msg = CreateMessage(topic)
+    SetMessageBody(msg, body)
+    SetMessageKeys(msg, key)
+    SetMessageTags(msg, "ThisMessageTag.")
+    result = SendMessageSync(producer,msg)
+    print(result)
+    print("Msgid:")
+    print(result.GetMsgId())
+    print("Offset:")
+    print(result.offset)
+    print("sendStatus:")
+    print(result.sendStatus)
+    DestroyMessage(msg)
+    print("Done...............")
+
+def releaseProducer(producer):
+    ShutdownProducer(producer)
+    DestroyProducer(producer)
+    print("--------Release producer-----------")
+
diff --git a/sample/testConsumer.py b/sample/testConsumer.py
new file mode 100644
index 0000000..1e0a452
--- /dev/null
+++ b/sample/testConsumer.py
@@ -0,0 +1,49 @@
+#/*
+#* Licensed to the Apache Software Foundation (ASF) under one or more
+#* contributor license agreements.  See the NOTICE file distributed with
+#* this work for additional information regarding copyright ownership.
+#* The ASF licenses this file to You under the Apache License, Version 2.0
+#* (the "License"); you may not use this file except in compliance with
+#* the License.  You may obtain a copy of the License at
+#*
+#*     http://www.apache.org/licenses/LICENSE-2.0
+#*
+#* Unless required by applicable law or agreed to in writing, software
+#* distributed under the License is distributed on an "AS IS" BASIS,
+#* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#* See the License for the specific language governing permissions and
+#* limitations under the License.
+#*/
+
+import base
+import time
+from librocketmqclientpython import *
+totalMsg = 0
+def consumerMessage(msg):
+     global totalMsg
+     totalMsg += 1
+     print(">>ConsumerMessage Called:",totalMsg)
+     print(GetMessageTopic(msg))
+     print(GetMessageTags(msg))
+     print(GetMessageBody(msg))
+     print(GetMessageId(msg))
+     return 0
+
+print("Consumer Starting.....")
+
+consumer = CreatePushConsumer("awtTest_Producer_Python_Test")
+print(consumer)
+SetPushConsumerNameServerAddress(consumer,"172.17.0.5:9876")
+SetPushConsumerThreadCount(consumer,1)
+Subscribe(consumer, "T_TestTopic", "*")
+RegisterMessageCallback(consumer,consumerMessage)
+StartPushConsumer(consumer)
+i = 1
+while i <= 60:
+    print(i)
+    i += 1
+    time.sleep(10) 
+
+ShutdownPushConsumer(consumer)
+DestroyPushConsumer(consumer)
+print("Consumer Down....")
diff --git a/sample/testProducer.py b/sample/testProducer.py
new file mode 100644
index 0000000..1bb2c42
--- /dev/null
+++ b/sample/testProducer.py
@@ -0,0 +1,33 @@
+#/*
+#* Licensed to the Apache Software Foundation (ASF) under one or more
+#* contributor license agreements.  See the NOTICE file distributed with
+#* this work for additional information regarding copyright ownership.
+#* The ASF licenses this file to You under the Apache License, Version 2.0
+#* (the "License"); you may not use this file except in compliance with
+#* the License.  You may obtain a copy of the License at
+#*
+#*     http://www.apache.org/licenses/LICENSE-2.0
+#*
+#* Unless required by applicable law or agreed to in writing, software
+#* distributed under the License is distributed on an "AS IS" BASIS,
+#* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#* See the License for the specific language governing permissions and
+#* limitations under the License.
+#*/
+
+from base import *
+import time
+
+
+producer = initProducer("TestPythonProducer")
+topic = "T_TestTopic"
+key = "TestKeys"
+body = "ThisIsTestBody"
+i = 0
+while i < 10000:
+    i += 1
+    testSendMssage(producer,topic,key,body)
+    
+    print("Now Send Message:",i)
+
+releaseProducer(producer)
diff --git a/src/PythonWrapper.cpp b/src/PythonWrapper.cpp
new file mode 100644
index 0000000..b6c04b6
--- /dev/null
+++ b/src/PythonWrapper.cpp
@@ -0,0 +1,283 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#include "CCommon.h"
+#include "CMessage.h"
+#include "CMessageExt.h"
+#include "CSendResult.h"
+#include "CProducer.h"
+#include "CPushConsumer.h"
+#include "PythonWrapper.h"
+#include <boost/python.hpp>
+#include <map>
+
+using namespace boost::python;
+using namespace std;
+
+const char *VERSION =
+        "PYTHON_CLIENT_VERSION: " PYTHON_CLIENT_VERSION ", BUILD DATE: " PYCLI_BUILD_DATE " ";
+
+map<CPushConsumer *, PyObject *> g_CallBackMap;
+
+class PyThreadStateLock {
+public:
+    PyThreadStateLock(void) {
+        state = PyGILState_Ensure();
+    }
+
+    ~PyThreadStateLock(void) {
+        if (state == PyGILState_LOCKED) {
+            PyGILState_Release(state);
+        }
+    }
+
+private:
+    PyGILState_STATE state;
+};
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+void *PyCreateMessage(const char *topic) {
+
+    return (void *) CreateMessage(topic);
+}
+
+int PyDestroyMessage(void *msg) {
+    return DestroyMessage((CMessage *) msg);
+}
+int PySetMessageTopic(void *msg, const char *topic) {
+    return SetMessageTopic((CMessage *) msg, topic);
+}
+int PySetMessageTags(void *msg, const char *tags) {
+    return SetMessageTags((CMessage *) msg, tags);
+}
+int PySetMessageKeys(void *msg, const char *keys) {
+    return SetMessageKeys((CMessage *) msg, keys);
+}
+int PySetMessageBody(void *msg, const char *body) {
+    return SetMessageBody((CMessage *) msg, body);
+}
+int PySetByteMessageBody(void *msg, const char *body, int len) {
+    return SetByteMessageBody((CMessage *) msg, body, len);
+}
+int PySetMessageProperty(void *msg, const char *key, const char *value) {
+    return SetMessageProperty((CMessage *) msg, key, value);
+}
+int PySetMessageDelayTimeLevel(void *msg, int level) {
+    return SetDelayTimeLevel((CMessage *) msg, level);
+}
+//messageExt
+const char *PyGetMessageTopic(PyMessageExt msgExt) {
+    return GetMessageTopic((CMessageExt *) msgExt.pMessageExt);
+}
+const char *PyGetMessageTags(PyMessageExt msgExt) {
+    return GetMessageTags((CMessageExt *) msgExt.pMessageExt);
+}
+const char *PyGetMessageKeys(PyMessageExt msgExt) {
+    return GetMessageKeys((CMessageExt *) msgExt.pMessageExt);
+}
+const char *PyGetMessageBody(PyMessageExt msgExt) {
+    return GetMessageBody((CMessageExt *) msgExt.pMessageExt);
+}
+const char *PyGetMessageProperty(PyMessageExt msgExt, const char *key) {
+    return GetMessageProperty((CMessageExt *) msgExt.pMessageExt, key);
+}
+const char *PyGetMessageId(PyMessageExt msgExt) {
+    return GetMessageId((CMessageExt *) msgExt.pMessageExt);
+}
+
+//producer
+void *PyCreateProducer(const char *groupId) {
+    return (void *) CreateProducer(groupId);
+}
+int PyDestroyProducer(void *producer) {
+    return DestroyProducer((CProducer *) producer);
+}
+int PyStartProducer(void *producer) {
+    return StartProducer((CProducer *) producer);
+}
+int PyShutdownProducer(void *producer) {
+    return ShutdownProducer((CProducer *) producer);
+}
+int PySetProducerNameServerAddress(void *producer, const char *namesrv) {
+    return SetProducerNameServerAddress((CProducer *) producer, namesrv);
+}
+int PySetProducerInstanceName(void *producer, const char *instanceName) {
+    return SetProducerInstanceName((CProducer *)producer, instanceName);
+}
+int PySetProducerSessionCredentials(void *producer, const char *accessKey, const char *secretKey, const char *channel) {
+    return SetProducerSessionCredentials((CProducer *)producer, accessKey, secretKey, channel);
+}
+PySendResult PySendMessageSync(void *producer, void *msg) {
+    PySendResult ret;
+    CSendResult result;
+    SendMessageSync((CProducer *) producer, (CMessage *) msg, &result);
+    ret.sendStatus = result.sendStatus;
+    ret.offset = result.offset;
+    strncpy(ret.msgId, result.msgId, MAX_MESSAGE_ID_LENGTH - 1);
+    ret.msgId[MAX_MESSAGE_ID_LENGTH - 1] = 0;
+    return ret;
+}
+
+//SendResult
+const char *PyGetSendResultMsgID(CSendResult &sendResult) {
+    return (const char *) (sendResult.msgId);
+}
+//consumer
+void *PyCreatePushConsumer(const char *groupId) {
+    //Py_Initialize();
+    PyEval_InitThreads();
+//    PyEval_ReleaseThread(PyThreadState_Get());
+    return (void *) CreatePushConsumer(groupId);
+}
+int PyDestroyPushConsumer(void *consumer) {
+    return DestroyPushConsumer((CPushConsumer *) consumer);
+}
+int PyStartPushConsumer(void *consumer) {
+    return StartPushConsumer((CPushConsumer *) consumer);
+}
+int PyShutdownPushConsumer(void *consumer) {
+    int ret = ShutdownPushConsumer((CPushConsumer *) consumer);
+    //PyGILState_Ensure();
+    //Py_Finalize();
+    return ret;
+}
+int PySetPushConsumerNameServerAddress(void *consumer, const char *namesrv) {
+    return SetPushConsumerNameServerAddress((CPushConsumer *) consumer, namesrv);
+}
+int PySubscribe(void *consumer, const char *topic, const char *expression) {
+    return Subscribe((CPushConsumer *) consumer, topic, expression);
+}
+int PyRegisterMessageCallback(void *consumer, PyObject *pCallback) {
+    CPushConsumer *consumerInner = (CPushConsumer *) consumer;
+    g_CallBackMap[consumerInner] = pCallback;
+    return RegisterMessageCallback(consumerInner, &PythonMessageCallBackInner);
+}
+
+int PythonMessageCallBackInner(CPushConsumer *consumer, CMessageExt *msg) {
+
+    class PyThreadStateLock PyThreadLock;
+    PyMessageExt message;
+    message.pMessageExt = msg;
+    map<CPushConsumer *, PyObject *>::iterator iter;
+    iter = g_CallBackMap.find(consumer);
+    if (iter != g_CallBackMap.end()) {
+        PyObject * pCallback = iter->second;
+        if (pCallback != NULL) {
+            int status =
+                    boost::python::call<int>(pCallback, message);
+            return status;
+        }
+    }
+    return 1;
+
+}
+
+int PySetPushConsumerThreadCount(void *consumer, int threadCount) {
+    return SetPushConsumerThreadCount((CPushConsumer *) consumer, threadCount);
+}
+int PySetPushConsumerMessageBatchMaxSize(void *consumer, int batchSize) {
+    return SetPushConsumerMessageBatchMaxSize((CPushConsumer *) consumer, batchSize);
+}
+int PySetPushConsumerInstanceName(void *consumer, const char *instanceName){
+    return SetPushConsumerInstanceName((CPushConsumer *)consumer, instanceName);
+}
+int PySetPushConsumerSessionCredentials(void *consumer, const char *accessKey, const char *secretKey,
+                                       const char *channel){
+    return SetPushConsumerSessionCredentials((CPushConsumer *)consumer, accessKey, secretKey, channel);
+}
+//version
+const char *PyGetVersion() {
+    return VERSION;
+}
+#ifdef __cplusplus
+};
+#endif
+BOOST_PYTHON_MODULE (librocketmqclientpython) {
+/*
+    class_<CMessage>("CMessage");
+    class_<CMessageExt>("CMessageExt");
+    class_<CProducer>("CProducer");
+    class_<CPushConsumer>("CPushConsumer");
+*/
+    enum_<CStatus>("CStatus")
+            .value("OK", OK)
+            .value("NULL_POINTER", NULL_POINTER);
+
+    enum_<CSendStatus>("CSendStatus")
+            .value("E_SEND_OK", E_SEND_OK)
+            .value("E_SEND_FLUSH_DISK_TIMEOUT", E_SEND_FLUSH_DISK_TIMEOUT)
+            .value("E_SEND_FLUSH_SLAVE_TIMEOUT", E_SEND_FLUSH_SLAVE_TIMEOUT)
+            .value("E_SEND_SLAVE_NOT_AVAILABLE", E_SEND_SLAVE_NOT_AVAILABLE);
+
+    enum_<CConsumeStatus>("CConsumeStatus")
+            .value("E_CONSUME_SUCCESS", E_CONSUME_SUCCESS)
+            .value("E_RECONSUME_LATER", E_RECONSUME_LATER);
+
+    class_<PySendResult>("SendResult")
+            .def_readonly("offset", &PySendResult::offset, "offset")
+                    //.def_readonly("msgId", &PySendResult::msgId, "msgId")
+            .def_readonly("sendStatus", &PySendResult::sendStatus, "sendStatus")
+            .def("GetMsgId", &PySendResult::GetMsgId);
+    class_<PyMessageExt>("CMessageExt");
+
+    //For Message
+    def("CreateMessage", PyCreateMessage, return_value_policy<return_opaque_pointer>());
+    def("DestroyMessage", PyDestroyMessage);
+    def("SetMessageTopic", PySetMessageTopic);
+    def("SetMessageTags", PySetMessageTags);
+    def("SetMessageKeys", PySetMessageKeys);
+    def("SetMessageBody", PySetMessageBody);
+    def("SetByteMessageBody", PySetByteMessageBody);
+    def("SetMessageProperty", PySetMessageProperty);
+    def("SetDelayTimeLevel", PySetMessageDelayTimeLevel);
+
+    //For MessageExt
+    def("GetMessageTopic", PyGetMessageTopic);
+    def("GetMessageTags", PyGetMessageTags);
+    def("GetMessageKeys", PyGetMessageKeys);
+    def("GetMessageBody", PyGetMessageBody);
+    def("GetMessageProperty", PyGetMessageProperty);
+    def("GetMessageId", PyGetMessageId);
+
+    //For producer
+    def("CreateProducer", PyCreateProducer, return_value_policy<return_opaque_pointer>());
+    def("DestroyProducer", PyDestroyProducer);
+    def("StartProducer", PyStartProducer);
+    def("ShutdownProducer", PyShutdownProducer);
+    def("SetProducerNameServerAddress", PySetProducerNameServerAddress);
+    def("SetProducerInstanceName", PySetProducerInstanceName);
+    def("SetProducerSessionCredentials", PySetProducerSessionCredentials);
+    def("SendMessageSync", PySendMessageSync);
+
+    //For Consumer
+    def("CreatePushConsumer", PyCreatePushConsumer, return_value_policy<return_opaque_pointer>());
+    def("DestroyPushConsumer", PyDestroyPushConsumer);
+    def("StartPushConsumer", PyStartPushConsumer);
+    def("ShutdownPushConsumer", PyShutdownPushConsumer);
+    def("SetPushConsumerNameServerAddress", PySetPushConsumerNameServerAddress);
+    def("SetPushConsumerThreadCount", PySetPushConsumerThreadCount);
+    def("SetPushConsumerMessageBatchMaxSize", PySetPushConsumerMessageBatchMaxSize);
+    def("SetPushConsumerInstanceName", PySetPushConsumerInstanceName);
+    def("SetPushConsumerSessionCredentials", PySetPushConsumerSessionCredentials);
+    def("Subscribe", PySubscribe);
+    def("RegisterMessageCallback", PyRegisterMessageCallback);
+
+    //For Version
+    def("GetVersion", PyGetVersion);
+}
+
diff --git a/src/PythonWrapper.h b/src/PythonWrapper.h
new file mode 100644
index 0000000..887e6f7
--- /dev/null
+++ b/src/PythonWrapper.h
@@ -0,0 +1,98 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "CCommon.h"
+#include "CMessage.h"
+#include "CMessageExt.h"
+#include "CSendResult.h"
+#include "CProducer.h"
+#include "CPushConsumer.h"
+#include <boost/python.hpp>
+
+using namespace boost::python;
+
+typedef struct _PySendResult_ {
+    CSendStatus sendStatus;
+    char msgId[MAX_MESSAGE_ID_LENGTH];
+    long long offset;
+
+    const char *GetMsgId() {
+        return (const char *) msgId;
+    }
+} PySendResult;
+
+typedef struct _PyMessageExt_ {
+    CMessageExt *pMessageExt;
+} PyMessageExt;
+
+#define PYTHON_CLIENT_VERSION "1.0.0"
+#define PYCLI_BUILD_DATE "16-10-2018"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+//message
+void *PyCreateMessage(const char *topic);
+int PyDestroyMessage(void *msg);
+int PySetMessageTopic(void *msg, const char *topic);
+int PySetMessageTags(void *msg, const char *tags);
+int PySetMessageKeys(void *msg, const char *keys);
+int PySetMessageBody(void *msg, const char *body);
+int PySetByteMessageBody(void *msg, const char *body, int len);
+int PySetMessageProperty(void *msg, const char *key, const char *value);
+int PySetMessageDelayTimeLevel(void *msg, int level);
+
+//messageExt
+const char *PyGetMessageTopic(PyMessageExt msgExt);
+const char *PyGetMessageTags(PyMessageExt msgExt);
+const char *PyGetMessageKeys(PyMessageExt msgExt);
+const char *PyGetMessageBody(PyMessageExt msgExt);
+const char *PyGetMessageProperty(PyMessageExt msgExt, const char *key);
+const char *PyGetMessageId(PyMessageExt msgExt);
+
+//producer
+void *PyCreateProducer(const char *groupId);
+int PyDestroyProducer(void *producer);
+int PyStartProducer(void *producer);
+int PyShutdownProducer(void *producer);
+int PySetProducerNameServerAddress(void *producer, const char *namesrv);
+int PySetProducerInstanceName(void *producer, const char *instanceName);
+int PySetProducerSessionCredentials(void *producer, const char *accessKey, const char *secretKey, const char *channel);
+PySendResult PySendMessageSync(void *producer, void *msg);
+
+//sendResult
+const char *PyGetSendResultMsgID(CSendResult &sendResult);
+
+//consumer
+void *PyCreatePushConsumer(const char *groupId);
+int PyDestroyPushConsumer(void *consumer);
+int PyStartPushConsumer(void *consumer);
+int PyShutdownPushConsumer(void *consumer);
+int PySetPushConsumerNameServerAddress(void *consumer, const char *namesrv);
+int PySubscribe(void *consumer, const char *topic, const char *expression);
+int PyRegisterMessageCallback(void *consumer, PyObject *pCallback);
+int PythonMessageCallBackInner(CPushConsumer *consumer, CMessageExt *msg);
+int PySetPushConsumerThreadCount(void *consumer, int threadCount);
+int PySetPushConsumerMessageBatchMaxSize(void *consumer, int batchSize);
+int PySetPushConsumerInstanceName(void *consumer, const char *instanceName);
+int PySetPushConsumerSessionCredentials(void *consumer, const char *accessKey, const char *secretKey,
+                                     const char *channel);
+#ifdef __cplusplus
+};
+#endif
+


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services