Python clients lacks startMessageIdInclusive setting
Closed this issue · 2 comments
Hi all,
As discussed in apache/pulsar#10483 and apache/pulsar#10328, it seems like the official way to get the latest message is to register a reader using startMessageIdInclusive and set the message id to latest
.
It seems like the functionality was added in the C++ client over at https://github.com/apache/pulsar/pull/17209/files, however has yet to come to the python client itself.
I believe (and very happy to be proven wrong), that this means python clients have no way of actually getting the latest value apart from iterating from the start, which is seems... suboptimal.
I think the change is very simple, like adding the property to https://github.com/apache/pulsar-client-python/blob/main/src/config.cc#L276, adding it to the conf
when making a reader, and updating the python signature. But the last time I wrote and compiled C++ was back in undergrad and I'm unsure how to even set up a development environment to contribute and test the issue.
I'm unsure how to even set up a development environment to contribute and test the issue.
The README provides the guide for how to test the issue. Regarding the development environment, you can use IDE like CLion. But for such simple changes, I think you can just write code via text editors and run the CLI commands referred in the README to test.
I admit the lack of documents for developers. Maybe we can add them later.
BTW, I developed the Python client via Vim with the coc.nvim plugin. Here is my .ccls
file (in Linux) provided for the ccls
LSP server:
g++
-std=c++11
-stdlib=libstdc++
-I
/home/xyz/software/pulsar-client-cpp/include
-I
/usr/include/python3.8
-I
./pybind11/include
I installed the C++ client to /home/xyz/software/pulsar-client-cpp
and the PyBind11 source code in ./pybind11
by following the guide in REAMDE.