{"id":14987877,"url":"https://github.com/apache/pulsar-client-cpp","last_synced_at":"2025-04-04T22:03:12.374Z","repository":{"id":61114405,"uuid":"542858846","full_name":"apache/pulsar-client-cpp","owner":"apache","description":"Apache Pulsar C++ client library","archived":false,"fork":false,"pushed_at":"2025-02-08T14:49:17.000Z","size":6511,"stargazers_count":53,"open_issues_count":71,"forks_count":69,"subscribers_count":33,"default_branch":"main","last_synced_at":"2025-03-28T21:04:32.936Z","etag":null,"topics":["event-streaming","messaging","pubsub","pulsar","queuing","streaming"],"latest_commit_sha":null,"homepage":"https://pulsar.apache.org/","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/apache.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-09-29T01:10:49.000Z","updated_at":"2025-02-08T14:49:21.000Z","dependencies_parsed_at":"2023-10-22T15:31:11.259Z","dependency_job_id":"2b5a4307-9fff-4391-8e78-a225674f98c3","html_url":"https://github.com/apache/pulsar-client-cpp","commit_stats":{"total_commits":1018,"total_committers":160,"mean_commits":6.3625,"dds":0.7632612966601179,"last_synced_commit":"8b2753a56579ea6cf11e26a0c5a160797518df63"},"previous_names":[],"tags_count":35,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Fpulsar-client-cpp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Fpulsar-client-cpp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Fpulsar-client-cpp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Fpulsar-client-cpp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/apache","download_url":"https://codeload.github.com/apache/pulsar-client-cpp/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247256104,"owners_count":20909240,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["event-streaming","messaging","pubsub","pulsar","queuing","streaming"],"created_at":"2024-09-24T14:15:37.445Z","updated_at":"2025-04-04T22:03:12.353Z","avatar_url":"https://github.com/apache.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!--\n\n    Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n      http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n--\u003e\n\n# Pulsar C++ client library\n\nPulsar C++ clients support a variety of Pulsar features to enable building applications connecting to your Pulsar cluster.\n\nFor the supported Pulsar features, see [Client Feature Matrix](https://pulsar.apache.org/client-feature-matrix/).\n\nFor how to use APIs to publish and consume messages, see [examples](https://github.com/apache/pulsar-client-cpp/tree/main/examples).\n\n## Import the library into your project\n\n### CMake with vcpkg integration\n\nNavigate to [vcpkg-example](./vcpkg-example) for how to import the `pulsar-client-cpp` into your project via vcpkg.\n\n### Download pre-built binaries\n\nFor non-vcpkg projects, you can download pre-built binaries from the [official release page](https://pulsar.apache.org/download/#pulsar-c-client).\n\n## Generate the API documents\n\nPulsar C++ client uses [doxygen](https://www.doxygen.nl) to build API documents. After installing `doxygen`, you only need to run `doxygen` to generate the API documents whose main page is under the `doxygen/html/index.html` path.\n\n## Build with vcpkg\n\nSince it's integrated with vcpkg, see [vcpkg#README](https://github.com/microsoft/vcpkg#readme) for the requirements. See [LEGACY_BUILD](./LEGACY_BUILD.md) if you want to manage dependencies by yourself or you cannot install vcpkg in your own environment.\n\n### How to build from source\n\nThe simplest way is to clone this project with the vcpkg submodule.\n\n```bash\ngit clone https://github.com/apache/pulsar-client-cpp.git\ncd pulsar-client-cpp\ngit submodule update --init --recursive\ncmake -B build -DINTEGRATE_VCPKG=ON\ncmake --build build -j8\n```\n\nThe 1st step will download vcpkg and then install all dependencies according to the version description in [vcpkg.json](./vcpkg.json). The 2nd step will build the Pulsar C++ libraries under `./build/lib/`, where `./build` is the CMake build directory.\n\n\u003e You can also add the CMAKE_TOOLCHAIN_FILE option if your system already have vcpkg installed.\n\u003e\n\u003e ```bash\n\u003e git clone https://github.com/apache/pulsar-client-cpp.git\n\u003e cd pulsar-client-cpp\n\u003e # For example, you can install vcpkg in /tmp/vcpkg\n\u003e cd /tmp \u0026\u0026 git clone https://github.com/microsoft/vcpkg.git \u0026\u0026 cd -\n\u003e cmake -B build -DINTEGRATE_VCPKG=ON -DCMAKE_TOOLCHAIN_FILE=\"/tmp/vcpkg/scripts/buildsystems/vcpkg.cmake\"\n\u003e cmake --build build -j8\n\u003e ```\n\nAfter the build, the hierarchy of the `build` directory will be:\n\n```\nbuild/\n  include/   -- extra C++ headers\n  lib/       -- libraries\n  tests/     -- test executables\n  examples/  -- example executables\n  generated/\n    lib/     -- protobuf source files for PulsarApi.proto\n    tests/   -- protobuf source files for *.proto used in tests\n```\n\n### How to install\n\nTo install the C++ headers and libraries into a specific path, e.g. `/tmp/pulsar`, run the following commands:\n\n```bash\ncmake -B build -DINTEGRATE_VCPKG=ON -DCMAKE_INSTALL_PREFIX=/tmp/pulsar\ncmake --build build -j8 --target install\n```\n\nFor example, on macOS you will see:\n\n```\n/tmp/pulsar/\n  include/pulsar     -- C/C++ headers\n  lib/\n    libpulsar.a      -- Static library\n    libpulsar.dylib  -- Dynamic library\n```\n\n### Tests\n\nTests are built by default. You should execute [run-unit-tests.sh](./run-unit-tests.sh) to run tests locally.\n\nIf you don't want to build the tests, disable the `BUILD_TESTS` option:\n\n```bash\ncmake -B build -DINTEGRATE_VCPKG=ON -DBUILD_TESTS=OFF\ncmake --build build -j8\n```\n\n### Build perf tools\n\nIf you want to build the perf tools, enable the `BUILD_PERF_TOOLS` option:\n\n```bash\ncmake -B build -DINTEGRATE_VCPKG=ON -DBUILD_PERF_TOOLS=ON\ncmake --build build -j8\n```\n\nThen the perf tools will be built under `./build/perf/`.\n\n## Platforms\n\nPulsar C++ Client Library has been tested on:\n\n- Linux\n- Mac OS X\n- Windows x64\n\n## Wireshark Dissector\n\nSee the [wireshark](wireshark/) directory for details.\n\n## Requirements for Contributors\n\nIt's required to install [LLVM](https://llvm.org/builds/) for `clang-tidy` and `clang-format`. Pulsar C++ client use `clang-format` **11** to format files. `make format` automatically formats the files.\n\nFor Ubuntu users, you can install `clang-format-11` via `apt install clang-format-11`. For other users, run `./build-support/docker-format.sh` if you have Docker installed.\n\nWe welcome contributions from the open source community, kindly make sure your changes are backward compatible with GCC 4.8 and Boost 1.53.\n\nIf your contribution adds Pulsar features for C++ clients, you need to update both the [Pulsar docs](https://pulsar.apache.org/docs/client-libraries/) and the [Client Feature Matrix](https://pulsar.apache.org/client-feature-matrix/). See [Contribution Guide](https://pulsar.apache.org/contribute/site-intro/#pages) for more details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapache%2Fpulsar-client-cpp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fapache%2Fpulsar-client-cpp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapache%2Fpulsar-client-cpp/lists"}