-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Conversation
We should state the version of python, which is 2 or 3, in the document, shouldn't we ? |
@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 |
There was a problem hiding this 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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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())) |
There was a problem hiding this comment.
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 ") |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 @@ | |||
# |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure
@jai1 Updated |
There was a problem hiding this 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.
Motivation
Add Python client library implemented as a wrapper on top of C++
client library.