pulsar-client 1.6.2 → 1.8.0-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/.asf.yaml +8 -1
  2. package/.github/PULL_REQUEST_TEMPLATE.md +85 -0
  3. package/.github/workflows/ci-build-release-napi.yml +213 -0
  4. package/.github/workflows/ci-pr-validation.yml +233 -0
  5. package/README.md +91 -68
  6. package/binding.gyp +48 -39
  7. package/{pulsar-test-service-stop.sh → build-support/dep-version.py} +4 -6
  8. package/build-support/download-release-artifacts.py +74 -0
  9. package/build-support/generate-source-archive.sh +28 -0
  10. package/{pulsar-test-service-start.sh → build-support/pulsar-test-container-start.sh} +11 -21
  11. package/build-support/pulsar-test-service-start.sh +37 -0
  12. package/build-support/pulsar-test-service-stop.sh +32 -0
  13. package/{.github/workflows/nodejs.yml → build-support/sign-files.sh} +13 -12
  14. package/build-support/stage-release.sh +44 -0
  15. package/dependencies.yaml +28 -0
  16. package/docs/release-process.md +271 -0
  17. package/examples/consumer.js +1 -1
  18. package/examples/consumer_listener.js +1 -1
  19. package/examples/consumer_tls_auth.js +1 -1
  20. package/examples/custom_logger.js +60 -0
  21. package/examples/encryption-consumer.js +1 -1
  22. package/examples/encryption-producer.js +1 -1
  23. package/examples/producer.js +1 -1
  24. package/examples/producer_tls_auth.js +1 -1
  25. package/examples/reader.js +1 -1
  26. package/examples/reader_listener.js +1 -1
  27. package/index.d.ts +12 -4
  28. package/index.js +2 -1
  29. package/package.json +16 -13
  30. package/pkg/linux/Dockerfile_linux_glibc +35 -0
  31. package/pkg/linux/Dockerfile_linux_musl +32 -0
  32. package/pkg/linux/build-napi-inside-docker.sh +31 -0
  33. package/pkg/linux/download-cpp-client.sh +65 -0
  34. package/pkg/load_test.js +34 -0
  35. package/pkg/mac/build-cpp-deps-lib.sh +186 -0
  36. package/pkg/mac/build-cpp-lib.sh +48 -0
  37. package/{docker-tests.sh → pkg/mac/common.sh} +13 -13
  38. package/pkg/windows/download-cpp-client.bat +12 -0
  39. package/pulsar-client-cpp.txt +2 -0
  40. package/src/AuthenticationAthenz.js +1 -1
  41. package/src/AuthenticationOauth2.js +1 -1
  42. package/src/AuthenticationTls.js +1 -1
  43. package/src/AuthenticationToken.js +1 -1
  44. package/src/Client.cc +84 -58
  45. package/src/Client.h +6 -4
  46. package/src/Consumer.cc +331 -234
  47. package/src/Consumer.h +11 -9
  48. package/src/ConsumerConfig.cc +54 -32
  49. package/src/ConsumerConfig.h +5 -6
  50. package/src/Message.cc +26 -29
  51. package/src/Message.h +4 -4
  52. package/src/MessageId.cc +19 -22
  53. package/src/MessageId.h +5 -6
  54. package/src/MessageListener.h +3 -8
  55. package/src/Producer.cc +116 -133
  56. package/src/Producer.h +3 -3
  57. package/src/ProducerConfig.cc +39 -22
  58. package/src/ProducerConfig.h +2 -2
  59. package/src/Reader.cc +147 -128
  60. package/src/Reader.h +5 -3
  61. package/src/ReaderConfig.cc +14 -20
  62. package/src/ReaderConfig.h +5 -6
  63. package/src/ReaderListener.h +2 -7
  64. package/src/SchemaInfo.cc +78 -0
  65. package/src/SchemaInfo.h +41 -0
  66. package/src/ThreadSafeDeferred.cc +98 -0
  67. package/src/ThreadSafeDeferred.h +85 -0
  68. package/src/pulsar-binding.js +26 -0
  69. package/tests/conf/standalone.conf +6 -0
  70. package/tests/consumer.test.js +2 -2
  71. package/tests/docker-load-test.sh +35 -0
  72. package/tests/end_to_end.test.js +214 -2
  73. package/tests/load-test.sh +43 -0
  74. package/tests/producer.test.js +2 -2
  75. package/{run-unit-tests.sh → tests/run-unit-tests.sh} +6 -15
  76. package/pulsar-version.txt +0 -1
@@ -0,0 +1,31 @@
1
+ #!/usr/bin/env bash
2
+ #
3
+ # Licensed to the Apache Software Foundation (ASF) under one
4
+ # or more contributor license agreements. See the NOTICE file
5
+ # distributed with this work for additional information
6
+ # regarding copyright ownership. The ASF licenses this file
7
+ # to you under the Apache License, Version 2.0 (the
8
+ # "License"); you may not use this file except in compliance
9
+ # with the License. You may obtain a copy of the License at
10
+ #
11
+ # http://www.apache.org/licenses/LICENSE-2.0
12
+ #
13
+ # Unless required by applicable law or agreed to in writing,
14
+ # software distributed under the License is distributed on an
15
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16
+ # KIND, either express or implied. See the License for the
17
+ # specific language governing permissions and limitations
18
+ # under the License.
19
+ #
20
+
21
+ set -e -x
22
+
23
+ cd /pulsar-client-node
24
+
25
+ pkg/linux/download-cpp-client.sh
26
+
27
+ npm install --ignore-scripts
28
+ npx node-pre-gyp configure
29
+ npx node-pre-gyp build
30
+ npx node-pre-gyp package
31
+ node pkg/load_test.js
@@ -0,0 +1,65 @@
1
+ #!/usr/bin/env bash
2
+ #
3
+ # Licensed to the Apache Software Foundation (ASF) under one
4
+ # or more contributor license agreements. See the NOTICE file
5
+ # distributed with this work for additional information
6
+ # regarding copyright ownership. The ASF licenses this file
7
+ # to you under the Apache License, Version 2.0 (the
8
+ # "License"); you may not use this file except in compliance
9
+ # with the License. You may obtain a copy of the License at
10
+ #
11
+ # http://www.apache.org/licenses/LICENSE-2.0
12
+ #
13
+ # Unless required by applicable law or agreed to in writing,
14
+ # software distributed under the License is distributed on an
15
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16
+ # KIND, either express or implied. See the License for the
17
+ # specific language governing permissions and limitations
18
+ # under the License.
19
+ #
20
+
21
+ set -e -x
22
+
23
+ ROOT_DIR=`cd $(dirname $0) && cd ../../ && pwd`
24
+ source $ROOT_DIR/pulsar-client-cpp.txt
25
+
26
+ if [ $USER != "root" ]; then
27
+ SUDO="sudo"
28
+ fi
29
+
30
+ # Get the flavor of Linux
31
+ export $(cat /etc/*-release | grep "^ID=")
32
+ UNAME_ARCH=$(uname -m)
33
+ if [ $UNAME_ARCH == 'aarch64' ]; then
34
+ PLATFORM=arm64
35
+ else
36
+ PLATFORM=x86_64
37
+ fi
38
+
39
+ rm -rf $ROOT_DIR/pkg/linux/pulsar-cpp
40
+ mkdir $ROOT_DIR/pkg/linux/pulsar-cpp
41
+ rm -rf $ROOT_DIR/pkg/linux/tmp
42
+ mkdir $ROOT_DIR/pkg/linux/tmp
43
+ cd $ROOT_DIR/pkg/linux/tmp
44
+
45
+ if [ $ID == 'ubuntu' -o $ID == 'debian' ]; then
46
+ curl -L -O ${CPP_CLIENT_BASE_URL}/deb-${PLATFORM}/apache-pulsar-client-dev.deb
47
+ $SUDO ar x apache-pulsar-client-dev.deb
48
+ $SUDO tar -xvf data.tar.xz
49
+ cp -r usr/* $ROOT_DIR/pkg/linux/pulsar-cpp/
50
+
51
+ elif [ $ID == 'alpine' ]; then
52
+ curl -L -O ${CPP_CLIENT_BASE_URL}/apk-${PLATFORM}/${UNAME_ARCH}/apache-pulsar-client-dev-${CPP_CLIENT_VERSION}-r0.apk
53
+ $SUDO tar -xvf apache-pulsar-client-dev-${CPP_CLIENT_VERSION}-r0.apk
54
+ cp -r usr/* $ROOT_DIR/pkg/linux/pulsar-cpp/
55
+
56
+ elif [ $ID == '"centos"' -o $ID == '"rocky"' ]; then
57
+ curl -L -O ${CPP_CLIENT_BASE_URL}/rpm-${PLATFORM}/${UNAME_ARCH}/apache-pulsar-client-devel-${CPP_CLIENT_VERSION}-1.${UNAME_ARCH}.rpm
58
+ $SUDO rpm -i --prefix=$ROOT_DIR/pkg/linux/pulsar-cpp apache-pulsar-client-devel-${CPP_CLIENT_VERSION}-1.${UNAME_ARCH}.rpm --nodeps --force
59
+
60
+ else
61
+ echo "Unknown Linux distribution: '$ID'"
62
+ exit 1
63
+ fi
64
+
65
+ $SUDO rm -rf $ROOT_DIR/pkg/linux/tmp
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Licensed to the Apache Software Foundation (ASF) under one
3
+ * or more contributor license agreements. See the NOTICE file
4
+ * distributed with this work for additional information
5
+ * regarding copyright ownership. The ASF licenses this file
6
+ * to you under the Apache License, Version 2.0 (the
7
+ * "License"); you may not use this file except in compliance
8
+ * with the License. You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing,
13
+ * software distributed under the License is distributed on an
14
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15
+ * KIND, either express or implied. See the License for the
16
+ * specific language governing permissions and limitations
17
+ * under the License.
18
+ */
19
+
20
+ const Pulsar = require('../index.js');
21
+
22
+ (async () => {
23
+ Pulsar.Client.setLogHandler((level, file, line, message) => {
24
+ console.log('[%s][%s:%d] %s', Pulsar.LogLevel.toString(level), file, line, message);
25
+ });
26
+
27
+ // Create a client
28
+ const clientConfig = {
29
+ serviceUrl: 'pulsar://localhost:6650',
30
+ };
31
+
32
+ const client = new Pulsar.Client(clientConfig);
33
+ await client.close();
34
+ })();
@@ -0,0 +1,186 @@
1
+ #!/usr/bin/env bash
2
+ #
3
+ # Licensed to the Apache Software Foundation (ASF) under one
4
+ # or more contributor license agreements. See the NOTICE file
5
+ # distributed with this work for additional information
6
+ # regarding copyright ownership. The ASF licenses this file
7
+ # to you under the Apache License, Version 2.0 (the
8
+ # "License"); you may not use this file except in compliance
9
+ # with the License. You may obtain a copy of the License at
10
+ #
11
+ # http://www.apache.org/licenses/LICENSE-2.0
12
+ #
13
+ # Unless required by applicable law or agreed to in writing,
14
+ # software distributed under the License is distributed on an
15
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16
+ # KIND, either express or implied. See the License for the
17
+ # specific language governing permissions and limitations
18
+ # under the License.
19
+ #
20
+
21
+ source $(dirname $0)/common.sh
22
+
23
+ cd $ROOT_DIR
24
+
25
+ pip3 install pyyaml
26
+
27
+ dep=$ROOT_DIR/build-support/dep-version.py
28
+ ZLIB_VERSION=$($dep zlib)
29
+ OPENSSL_VERSION=$($dep openssl)
30
+ BOOST_VERSION=$($dep boost)
31
+ PROTOBUF_VERSION=$($dep protobuf)
32
+ ZSTD_VERSION=$($dep zstd)
33
+ SNAPPY_VERSION=$($dep snappy)
34
+ CURL_VERSION=$($dep curl)
35
+
36
+ cd $MAC_BUILD_DIR/build
37
+
38
+ ##############################################################################
39
+ if [ ! -f zlib-${ZLIB_VERSION}.done ]; then
40
+ echo "Building ZLib"
41
+ curl -O -L https://zlib.net/fossils/zlib-${ZLIB_VERSION}.tar.gz
42
+ tar xfz zlib-$ZLIB_VERSION.tar.gz
43
+ pushd zlib-$ZLIB_VERSION
44
+ CFLAGS="-fPIC -O3 -arch ${ARCH} -mmacosx-version-min=${MACOSX_DEPLOYMENT_TARGET}" ./configure --prefix=$PREFIX
45
+ make -j16
46
+ make install
47
+ popd
48
+
49
+ rm -rf zlib-$ZLIB_VERSION.tar.gz zlib-$ZLIB_VERSION
50
+ touch zlib-${ZLIB_VERSION}.done
51
+ else
52
+ echo "Using cached ZLib"
53
+ fi
54
+
55
+ ###############################################################################
56
+ OPENSSL_VERSION_UNDERSCORE=$(echo $OPENSSL_VERSION | sed 's/\./_/g')
57
+ if [ ! -f openssl-OpenSSL_${OPENSSL_VERSION_UNDERSCORE}.done ]; then
58
+ echo "Building OpenSSL"
59
+ curl -O -L https://github.com/openssl/openssl/archive/OpenSSL_${OPENSSL_VERSION_UNDERSCORE}.tar.gz
60
+ tar xfz OpenSSL_${OPENSSL_VERSION_UNDERSCORE}.tar.gz
61
+ pushd openssl-OpenSSL_${OPENSSL_VERSION_UNDERSCORE}
62
+ if [ $ARCH = 'arm64' ]; then
63
+ PLATFORM=darwin64-arm64-cc
64
+ else
65
+ PLATFORM=darwin64-x86_64-cc
66
+ fi
67
+ ./Configure --prefix=$PREFIX no-shared no-unit-test $PLATFORM
68
+ make -j8
69
+ make install_sw
70
+ popd
71
+
72
+ rm -rf OpenSSL_${OPENSSL_VERSION_UNDERSCORE}.tar.gz openssl-OpenSSL_${OPENSSL_VERSION_UNDERSCORE}
73
+ touch openssl-OpenSSL_${OPENSSL_VERSION_UNDERSCORE}.done
74
+ else
75
+ echo "Using cached OpenSSL"
76
+ fi
77
+
78
+ ###############################################################################
79
+ BOOST_VERSION_=${BOOST_VERSION//./_}
80
+ DIR=boost-src-${BOOST_VERSION}
81
+ if [ ! -f $DIR.done ]; then
82
+ echo "Building Boost"
83
+ curl -O -L https://boostorg.jfrog.io/artifactory/main/release/${BOOST_VERSION}/source/boost_${BOOST_VERSION_}.tar.gz
84
+ tar xfz boost_${BOOST_VERSION_}.tar.gz
85
+ rm -rf $DIR
86
+ mv boost_${BOOST_VERSION_} $DIR
87
+
88
+ pushd $DIR
89
+ ./bootstrap.sh --prefix=$PREFIX --with-libraries=system
90
+ ./b2 address-model=64 cxxflags="-fPIC -arch ${ARCH} -mmacosx-version-min=${MACOSX_DEPLOYMENT_TARGET}" \
91
+ link=static threading=multi \
92
+ variant=release \
93
+ install
94
+ popd
95
+
96
+ rm -rf $DIR boost_${BOOST_VERSION_}.tar.gz
97
+ touch $DIR.done
98
+ else
99
+ echo "Using cached Boost"
100
+ fi
101
+
102
+ ###############################################################################
103
+ if [ ! -f protobuf-${PROTOBUF_VERSION}.done ]; then
104
+ echo "Building Protobuf"
105
+ curl -O -L https://github.com/google/protobuf/releases/download/v${PROTOBUF_VERSION}/protobuf-cpp-${PROTOBUF_VERSION}.tar.gz
106
+ tar xfz protobuf-cpp-${PROTOBUF_VERSION}.tar.gz
107
+ pushd protobuf-${PROTOBUF_VERSION}
108
+ CXXFLAGS="-fPIC -arch arm64 -arch x86_64 -mmacosx-version-min=${MACOSX_DEPLOYMENT_TARGET}" \
109
+ ./configure --prefix=$PREFIX
110
+ make -j16 V=1
111
+ make install
112
+ popd
113
+
114
+ pushd install/lib
115
+ echo "Propose target arch static lib" ${ARCH}
116
+ mv libprotobuf.a libprotobuf_universal.a
117
+ lipo libprotobuf_universal.a -thin ${ARCH} -output libprotobuf.a
118
+ popd
119
+
120
+ rm -rf protobuf-${PROTOBUF_VERSION} protobuf-cpp-${PROTOBUF_VERSION}.tar.gz
121
+ touch protobuf-${PROTOBUF_VERSION}.done
122
+ else
123
+ echo "Using cached Protobuf"
124
+ fi
125
+
126
+ ###############################################################################
127
+ if [ ! -f zstd-${ZSTD_VERSION}.done ]; then
128
+ echo "Building ZStd"
129
+ curl -O -L https://github.com/facebook/zstd/releases/download/v${ZSTD_VERSION}/zstd-${ZSTD_VERSION}.tar.gz
130
+ tar xfz zstd-${ZSTD_VERSION}.tar.gz
131
+ pushd zstd-${ZSTD_VERSION}
132
+ CFLAGS="-fPIC -O3 -arch ${ARCH} -mmacosx-version-min=${MACOSX_DEPLOYMENT_TARGET}" \
133
+ PREFIX=$PREFIX \
134
+ make -j16 -C lib install
135
+ popd
136
+
137
+ rm -rf zstd-${ZSTD_VERSION} zstd-${ZSTD_VERSION}.tar.gz
138
+ touch zstd-${ZSTD_VERSION}.done
139
+ else
140
+ echo "Using cached ZStd"
141
+ fi
142
+
143
+ ###############################################################################
144
+ if [ ! -f snappy-${SNAPPY_VERSION}.done ]; then
145
+ echo "Building Snappy"
146
+ curl -O -L https://github.com/google/snappy/archive/refs/tags/${SNAPPY_VERSION}.tar.gz
147
+ tar xfz ${SNAPPY_VERSION}.tar.gz
148
+ pushd snappy-${SNAPPY_VERSION}
149
+ CXXFLAGS="-fPIC -O3 -mmacosx-version-min=${MACOSX_DEPLOYMENT_TARGET}" \
150
+ cmake . -DCMAKE_OSX_ARCHITECTURES=${ARCH} -DCMAKE_INSTALL_PREFIX=$PREFIX -DSNAPPY_BUILD_TESTS=OFF -DSNAPPY_BUILD_BENCHMARKS=OFF
151
+ make -j16
152
+ make install
153
+ touch .done
154
+ popd
155
+
156
+ rm -rf snappy-${SNAPPY_VERSION} ${SNAPPY_VERSION}.tar.gz
157
+ touch snappy-${SNAPPY_VERSION}.done
158
+ else
159
+ echo "Using cached Snappy"
160
+ fi
161
+
162
+ ###############################################################################
163
+ if [ ! -f curl-${CURL_VERSION}.done ]; then
164
+ echo "Building LibCurl"
165
+ CURL_VERSION_=${CURL_VERSION//./_}
166
+ curl -O -L https://github.com/curl/curl/releases/download/curl-${CURL_VERSION_}/curl-${CURL_VERSION}.tar.gz
167
+ tar xfz curl-${CURL_VERSION}.tar.gz
168
+ pushd curl-${CURL_VERSION}
169
+ CFLAGS="-fPIC -arch ${ARCH} -mmacosx-version-min=${MACOSX_DEPLOYMENT_TARGET}" \
170
+ ./configure --with-ssl=$PREFIX \
171
+ --without-nghttp2 \
172
+ --without-libidn2 \
173
+ --disable-ldap \
174
+ --without-brotli \
175
+ --without-secure-transport \
176
+ --disable-ipv6 \
177
+ --prefix=$PREFIX \
178
+ --host=$ARCH-apple-darwin
179
+ make -j16 install
180
+ popd
181
+
182
+ rm -rf curl-${CURL_VERSION} curl-${CURL_VERSION}.tar.gz
183
+ touch curl-${CURL_VERSION}.done
184
+ else
185
+ echo "Using cached LibCurl"
186
+ fi
@@ -0,0 +1,48 @@
1
+ #!/usr/bin/env bash
2
+ #
3
+ # Licensed to the Apache Software Foundation (ASF) under one
4
+ # or more contributor license agreements. See the NOTICE file
5
+ # distributed with this work for additional information
6
+ # regarding copyright ownership. The ASF licenses this file
7
+ # to you under the Apache License, Version 2.0 (the
8
+ # "License"); you may not use this file except in compliance
9
+ # with the License. You may obtain a copy of the License at
10
+ #
11
+ # http://www.apache.org/licenses/LICENSE-2.0
12
+ #
13
+ # Unless required by applicable law or agreed to in writing,
14
+ # software distributed under the License is distributed on an
15
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16
+ # KIND, either express or implied. See the License for the
17
+ # specific language governing permissions and limitations
18
+ # under the License.
19
+ #
20
+
21
+ source $(dirname $0)/common.sh
22
+
23
+ PULSAR_DIR=${MAC_BUILD_DIR}/build-pulsar
24
+ PULSAR_PREFIX=${PULSAR_DIR}/install
25
+ mkdir -p $PULSAR_PREFIX
26
+ cd $PULSAR_DIR
27
+
28
+ ## Fetch from official release
29
+ curl -O -L "$CPP_CLIENT_BASE_URL"/apache-pulsar-client-cpp-${CPP_CLIENT_VERSION}.tar.gz
30
+ tar xfz apache-pulsar-client-cpp-${CPP_CLIENT_VERSION}.tar.gz
31
+ pushd apache-pulsar-client-cpp-${CPP_CLIENT_VERSION}
32
+ rm -f CMakeCache.txt
33
+ cmake . \
34
+ -DCMAKE_OSX_ARCHITECTURES=${ARCH} \
35
+ -DCMAKE_OSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET} \
36
+ -DCMAKE_INSTALL_PREFIX=$PULSAR_PREFIX \
37
+ -DCMAKE_BUILD_TYPE=Release \
38
+ -DCMAKE_PREFIX_PATH=$PREFIX \
39
+ -DCMAKE_INSTALL_LIBDIR=$PULSAR_PREFIX/lib \
40
+ -DLINK_STATIC=ON \
41
+ -DBUILD_TESTS=OFF \
42
+ -DBUILD_PYTHON_WRAPPER=OFF \
43
+ -DBUILD_DYNAMIC_LIB=OFF \
44
+ -DPROTOC_PATH=$PREFIX/bin/protoc
45
+ make -j16 install
46
+ popd
47
+
48
+ rm -rf apache-pulsar-client-cpp-${CPP_CLIENT_VERSION}.tar.gz apache-pulsar-client-cpp-${CPP_CLIENT_VERSION}
@@ -1,4 +1,3 @@
1
- #!/bin/bash
2
1
  #
3
2
  # Licensed to the Apache Software Foundation (ASF) under one
4
3
  # or more contributor license agreements. See the NOTICE file
@@ -18,20 +17,21 @@
18
17
  # under the License.
19
18
  #
20
19
 
21
- ROOT_DIR=$(git rev-parse --show-toplevel)
22
- cd $ROOT_DIR
23
-
24
- BUILD_IMAGE_NAME="${BUILD_IMAGE_NAME:-apachepulsar/pulsar-build}"
25
- BUILD_IMAGE_VERSION="${BUILD_IMAGE_VERSION:-ubuntu-16.04}"
20
+ set -e -x
26
21
 
27
- IMAGE="$BUILD_IMAGE_NAME:$BUILD_IMAGE_VERSION"
22
+ if [ -z "$ARCH" ]; then
23
+ export ARCH=$(uname -m)
24
+ fi
28
25
 
29
- echo "---- Testing Pulsar node client using image $IMAGE"
26
+ export MACOSX_DEPLOYMENT_TARGET=11.0
30
27
 
31
- docker pull $IMAGE
28
+ MAC_BUILD_DIR=`cd $(dirname $0); pwd`
29
+ ROOT_DIR=$(git rev-parse --show-toplevel)
30
+ source $ROOT_DIR/pulsar-client-cpp.txt
32
31
 
33
- DOCKER_CMD="docker run -i -v $ROOT_DIR:/pulsar-client-node $IMAGE"
32
+ cd $MAC_BUILD_DIR
33
+ mkdir -p build
34
+ cd build
35
+ mkdir -p install
36
+ export PREFIX=`pwd`/install
34
37
 
35
- # Start Pulsar standalone instance
36
- # and execute the tests
37
- $DOCKER_CMD bash -c "cd /pulsar-client-node && ./run-unit-tests.sh"
@@ -0,0 +1,12 @@
1
+ cd %~dp0
2
+ set arch=%1
3
+ if "%arch%" == "" (
4
+ reg Query "HKLM\Hardware\Description\System\CentralProcessor\0" | find /i "x86" > NUL && set arch=x86 || set arch=x64
5
+ )
6
+ for /F "delims== tokens=1,2" %%a in (..\..\pulsar-client-cpp.txt) do set "%%a=%%b"
7
+ curl -O -L %CPP_CLIENT_BASE_URL%/%arch%-windows-static.tar.gz
8
+ tar -xvzf %arch%-windows-static.tar.gz
9
+ move %arch%-windows-static pulsar-cpp
10
+ dir
11
+
12
+
@@ -0,0 +1,2 @@
1
+ CPP_CLIENT_BASE_URL=https://archive.apache.org/dist/pulsar/pulsar-client-cpp-3.1.2
2
+ CPP_CLIENT_VERSION=3.1.2
@@ -17,7 +17,7 @@
17
17
  * under the License.
18
18
  */
19
19
 
20
- const PulsarBinding = require('bindings')('Pulsar');
20
+ const PulsarBinding = require('./pulsar-binding');
21
21
 
22
22
  class AuthenticationAthenz {
23
23
  constructor(params) {
@@ -16,7 +16,7 @@
16
16
  * specific language governing permissions and limitations
17
17
  * under the License.
18
18
  */
19
- const PulsarBinding = require('bindings')('Pulsar');
19
+ const PulsarBinding = require('./pulsar-binding');
20
20
 
21
21
  class AuthenticationOauth2 {
22
22
  constructor(params) {
@@ -17,7 +17,7 @@
17
17
  * under the License.
18
18
  */
19
19
 
20
- const PulsarBinding = require('bindings')('Pulsar');
20
+ const PulsarBinding = require('./pulsar-binding');
21
21
 
22
22
  class AuthenticationTls {
23
23
  constructor(params) {
@@ -17,7 +17,7 @@
17
17
  * under the License.
18
18
  */
19
19
 
20
- const PulsarBinding = require('bindings')('Pulsar');
20
+ const PulsarBinding = require('./pulsar-binding');
21
21
 
22
22
  class AuthenticationToken {
23
23
  constructor(params) {