GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Get Started
  • Concepts
  • Quickstart
  • Ecosystem
  • Client Libraries
  • Features
  • Use Cases
  • Welcome
  • Contribution Guide
  • Wiki
  • Issue Tracking
  • Blog
  • Books
  • Case Studies

This view

  • Original page
  • New address

GeezerVison is showing pulsar.apache.org — Set up Pulsar C++ client | Apache Pulsar

To set up C++ client library in Pulsar, complete the following steps.

Step 1: Install C++ client library​

Use one of the following methods to install a Pulsar C++ client.

Brew​

Use Homebrew to install the latest tagged version with the library and headers:

brew install libpulsar

Deb​

  1. Download any one of the Deb packages:

    • client
    • client-devel
    wget https://archive.apache.org/dist/pulsar/pulsar-client-cpp-4.2.0/deb-x86_64/apache-pulsar-client.deb

    This package contains shared library libpulsar.so.

    wget https://archive.apache.org/dist/pulsar/pulsar-client-cpp-4.2.0/deb-x86_64/apache-pulsar-client-dev.deb

    This package contains static libraries: libpulsar.a, libpulsarwithdeps.a, and C/C++ headers.

  2. Install the package using the following command:

    apt install ./apache-pulsar-client*.deb

Now, you can see Pulsar C++ client libraries installed under the /usr/lib directory.

RPM​

  1. Download any one of the RPM packages:

    • client
    • client-debuginfo
    • client-devel
    wget https://archive.apache.org/dist/pulsar/pulsar-client-cpp-4.2.0/rpm-x86_64/x86_64/apache-pulsar-client-4.2.0-1.x86_64.rpm

    This package contains shared library libpulsar.so.

    wget https://archive.apache.org/dist/pulsar/pulsar-client-cpp-4.2.0/rpm-x86_64/x86_64/apache-pulsar-client-debuginfo-4.2.0-1.x86_64.rpm

    This package contains debug symbols for libpulsar.so.

    wget https://archive.apache.org/dist/pulsar/pulsar-client-cpp-4.2.0/rpm-x86_64/x86_64/apache-pulsar-client-devel-4.2.0-1.x86_64.rpm

    This package contains static libraries: libpulsar.a, libpulsarwithdeps.a and C/C++ headers.

  2. Install the package using the following command:

    rpm -ivh apache-pulsar-client*.rpm

Now, you can see Pulsar C++ client libraries installed under the /usr/lib directory.

note

If you get an error like "libpulsar.so: cannot open shared object file: No such file or directory" when starting a Pulsar client, you need to run ldconfig first.

APK​

apk add --allow-untrusted ./apache-pulsar-client-*.apk

Step 2: Connect to Pulsar cluster​

To connect to Pulsar using client libraries, you need to specify a Pulsar protocol URL.

You can assign Pulsar protocol URLs to specific clusters and use the pulsar scheme. The following is an example of localhost with the default port 6650:

pulsar://localhost:6650

If you have multiple brokers, separate IP:port by commas:

pulsar://localhost:6550,localhost:6651,localhost:6652

If you use mTLS authentication, add +ssl in the scheme:

pulsar+ssl://pulsar.us-west.example.com:6651
Was this helpful?
✏️ Edit this page💡 Suggest changes🛟 Get support
  • Step 1: Install C++ client library
    • Brew
    • Deb
    • RPM
    • APK
  • Step 2: Connect to Pulsar cluster
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.