Skip to content

Commit ac4fcf0

Browse files
Upgrade the C++ client to 3.3.0 (#146)
### Modifications Upgrade the C++ client to 3.3.0 and deprecate the `log_conf_file_path` config due to apache/pulsar-client-cpp#283. There is another issue that after apache/pulsar-client-cpp#290, the CMakeLists.txt from the C++ client finds the protobuf package with config mode. To fix it, install the OpenSSL via CMake instead of the autotools.
1 parent 0de92b0 commit ac4fcf0

File tree

5 files changed

+9
-11
lines changed

5 files changed

+9
-11
lines changed

dependencies.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
#
1919

2020
cmake: 3.24.2
21-
pulsar-cpp: 3.2.0
21+
pulsar-cpp: 3.3.0
2222
pybind11: 2.10.1
2323
boost: 1.80.0
2424
protobuf: 3.20.0

pkg/mac/build-dependencies.sh

+6-4
Original file line numberDiff line numberDiff line change
@@ -150,10 +150,12 @@ if [ ! -f protobuf-${PROTOBUF_VERSION}/.done ]; then
150150
echo "Building Protobuf"
151151
download_dependency $ROOT_DIR/dependencies.yaml protobuf
152152
pushd protobuf-${PROTOBUF_VERSION}
153-
CXXFLAGS="-fPIC -arch arm64 -arch x86_64 -mmacosx-version-min=${MACOSX_DEPLOYMENT_TARGET}" \
154-
./configure --prefix=$PREFIX
155-
make -j16
156-
make install
153+
# Install by CMake so that the dependency can be found with CMake config mode
154+
pushd cmake/
155+
cmake -B build -DCMAKE_CXX_FLAGS="-fPIC -arch arm64 -arch x86_64 -mmacosx-version-min=${MACOSX_DEPLOYMENT_TARGET}" \
156+
-DCMAKE_INSTALL_PREFIX=$PREFIX
157+
cmake --build build -j16 --target install
158+
popd
157159
touch .done
158160
popd
159161
else

pulsar/__init__.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,8 @@ def __init__(self, service_url,
426426
Number of concurrent lookup-requests allowed on each broker connection to prevent overload
427427
on the broker.
428428
log_conf_file_path: str, optional
429-
Initialize log4cxx from a configuration file.
429+
This parameter is deprecated and makes no effect. It's retained only for compatibility.
430+
Use `logger` to customize a logger.
430431
use_tls: bool, default=False
431432
Configure whether to use TLS encryption on the connection. This setting is deprecated.
432433
TLS will be automatically enabled if the ``serviceUrl`` is set to ``pulsar+ssl://`` or ``https://``
@@ -468,8 +469,6 @@ def __init__(self, service_url,
468469
conf.io_threads(io_threads)
469470
conf.message_listener_threads(message_listener_threads)
470471
conf.concurrent_lookup_requests(concurrent_lookup_requests)
471-
if log_conf_file_path:
472-
conf.log_conf_file_path(log_conf_file_path)
473472

474473
if isinstance(logger, logging.Logger):
475474
conf.set_logger(self._prepare_logger(logger))

src/config.cc

-2
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,6 @@ void export_config(py::module_& m) {
156156
.def("concurrent_lookup_requests", &ClientConfiguration::getConcurrentLookupRequest)
157157
.def("concurrent_lookup_requests", &ClientConfiguration::setConcurrentLookupRequest,
158158
return_value_policy::reference)
159-
.def("log_conf_file_path", &ClientConfiguration::getLogConfFilePath, return_value_policy::copy)
160-
.def("log_conf_file_path", &ClientConfiguration::setLogConfFilePath, return_value_policy::reference)
161159
.def("use_tls", &ClientConfiguration::isUseTls)
162160
.def("use_tls", &ClientConfiguration::setUseTls, return_value_policy::reference)
163161
.def("tls_trust_certs_file_path", &ClientConfiguration::getTlsTrustCertsFilePath,

tests/pulsar_test.py

-1
Original file line numberDiff line numberDiff line change
@@ -773,7 +773,6 @@ def test_client_argument_errors(self):
773773
self._check_value_error(lambda: Client(self.serviceUrl, io_threads="test"))
774774
self._check_value_error(lambda: Client(self.serviceUrl, message_listener_threads="test"))
775775
self._check_value_error(lambda: Client(self.serviceUrl, concurrent_lookup_requests="test"))
776-
self._check_value_error(lambda: Client(self.serviceUrl, log_conf_file_path=5))
777776
self._check_value_error(lambda: Client(self.serviceUrl, use_tls="test"))
778777
self._check_value_error(lambda: Client(self.serviceUrl, tls_trust_certs_file_path=5))
779778
self._check_value_error(lambda: Client(self.serviceUrl, tls_allow_insecure_connection="test"))

0 commit comments

Comments
 (0)