commit | 8ba8ce4841947b9a3c2af90a6fe01b495c0d9418 | [log] [tgz] |
---|---|---|
author | Yosi Attias <yosy101@gmail.com> | Mon Mar 30 07:16:32 2020 +0300 |
committer | GitHub <noreply@github.com> | Mon Mar 30 13:16:32 2020 +0900 |
tree | 9114c71b122df14189e8ed4d6731dbd2a74bc152 | |
parent | 364f36d9a42259fae95f3dfd8c1e7774f9773917 [diff] |
Fix consumer being closed with message listener (#83) - Call `Ref()` when we a have message listener, to make sure this reference is kept a live. - Pass single consumer instance to message listener instead of re-creating it.
The Pulsar Node.js client can be used to create Pulsar producers and consumers in Node.js.
Pulsar Node.js client library is based on the C++ client library. Follow the instructions for C++ library for installing the binaries through RPM, Deb or Homebrew packages.
(Note: you will need to install not only the pulsar-client library but also the pulsar-client-dev library)
Also, this library works only in Node.js 10.x or later because it uses the node-addon-api module to wrap the C++ library.
Compatibility between each version of the Node.js client and the C++ client is as follows:
Node.js client | C++ client |
---|---|
1.0.0 | 2.3.0 or later |
1.1.0 | 2.4.0 or later |
If an incompatible version of the C++ client is installed, you may fail to build or run this library.
$ npm install pulsar-client
$ npm install @types/pulsar-client --save-dev
Please refer to examples.
$ git clone https://github.com/apache/pulsar-client-node.git $ cd pulsar-client-node $ npm install
$ npm run build