Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pulsar Python client library #468

Merged
merged 7 commits into from
Jun 15, 2017
Merged

Pulsar Python client library #468

merged 7 commits into from
Jun 15, 2017

Conversation

merlimat
Copy link
Contributor

Motivation

Add Python client library implemented as a wrapper on top of C++
client library.

@merlimat merlimat added the type/feature The PR added a new feature or issue requested a new feature label Jun 10, 2017
@merlimat merlimat added this to the 1.18 milestone Jun 10, 2017
@merlimat merlimat self-assigned this Jun 10, 2017
@apache apache deleted a comment from nelson-maltez Jun 10, 2017
@yush1ga
Copy link
Contributor

yush1ga commented Jun 10, 2017

We should state the version of python, which is 2 or 3, in the document, shouldn't we ?

@merlimat
Copy link
Contributor Author

@yush1ga Good point. I have just tried with python-2.7. It would be great to test it with python-3, but I don't find any Linux distribution that comes with libboost-pyhton for python 3 yet. I'll update the doc with the version info.

Copy link
Contributor

@jai1 jai1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice initiative - tried in company M/C - works well

@@ -0,0 +1,29 @@
#!/usr/bin/env python
Copy link
Contributor

@jai1 jai1 Jun 12, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't execute this file - correct default permissions

@@ -0,0 +1,36 @@
#!/usr/bin/env python
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't execute this file - correct default permissions


while True:
msg = consumer.receive()
print("Received message '{}' id='{}'".format(msg.data(), msg.message_id()))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change this to

print("Received message '{0}' id='{1}'".format(msg.data(), msg.message_id()))

SET(CMAKE_SHARED_LIBRARY_PREFIX )
SET(CMAKE_SHARED_LIBRARY_SUFFIX .so)

set (CMAKE_SHARED_LINKER_FLAGS " -static -undefined dynamic_lookup ")
Copy link
Contributor

@jai1 jai1 Jun 12, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In order to run it on (Red Hat Enterprise Linux Server release 6.5 (Santiago)) - I had to move this line under "if (APPLE) " condition since the error message suggests it's valid for MAC only

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this is to avoid linking with Python libs (since the wrapper will be loaded from inside python interpreter anyway)

set_target_properties(_pulsar PROPERTIES
LINK_FLAGS "-Wl,-all_load")
else ()
set_target_properties(_pulsar PROPERTIES
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

n order to run it on (Red Hat Enterprise Linux Server release 6.5 (Santiago)) - I had to delete this line

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was trying to statically link the wrapper with the library and all the dependencies to have a self-contained python wheel archive.. but it's not really working yet
I'll remove this for now

@@ -0,0 +1,121 @@
#
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't execute this file - correct default permissions

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure

@merlimat
Copy link
Contributor Author

@jai1 Updated

Copy link
Contributor

@jai1 jai1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look good for me and the clients work on Yahoo machines.

@merlimat merlimat merged commit 3750e2e into apache:master Jun 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/feature The PR added a new feature or issue requested a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants