{"id":20230992,"url":"https://github.com/bewaremypower/pulsar-client-cpp-demo","last_synced_at":"2025-03-03T13:42:52.111Z","repository":{"id":109020485,"uuid":"556665869","full_name":"BewareMyPower/pulsar-client-cpp-demo","owner":"BewareMyPower","description":"Examples of https://github.com/apache/pulsar-client-cpp","archived":false,"fork":false,"pushed_at":"2023-07-03T12:01:37.000Z","size":1163,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-14T00:22:21.058Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BewareMyPower.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-10-24T09:24:57.000Z","updated_at":"2022-11-25T07:01:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"225ba1f0-60f0-4cd5-b093-34c7c987b34b","html_url":"https://github.com/BewareMyPower/pulsar-client-cpp-demo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BewareMyPower%2Fpulsar-client-cpp-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BewareMyPower%2Fpulsar-client-cpp-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BewareMyPower%2Fpulsar-client-cpp-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BewareMyPower%2Fpulsar-client-cpp-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BewareMyPower","download_url":"https://codeload.github.com/BewareMyPower/pulsar-client-cpp-demo/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241677352,"owners_count":20001672,"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":[],"created_at":"2024-11-14T07:44:45.293Z","updated_at":"2025-03-03T13:42:52.084Z","avatar_url":"https://github.com/BewareMyPower.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pulsar-client-cpp-examples\n\nThe examples of [Pulsar C++ Client](https://github.com/apache/pulsar-client-cpp).\n\nIt's also helpful for verifying the official releases of the C++ client.\n\n## Verify the signature\n\nYou must first import the KEY file first. For example:\n\n```bash\ncurl -O -L https://dist.apache.org/repos/dist/dev/pulsar/KEYS\ngpg --import KEYS\n```\n\nThen, for any file, you can use [verify.sh](./verify.sh) to verify the release. For example:\n\n```bash\n./verify.sh https://dist.apache.org/repos/dist/dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.1.0-candidate-3/apache-pulsar-client-cpp-3.1.0.tar.gz\n```\n\nYou will see the following outputs if there is nothing wrong:\n\n```\n[OK] GPG verified\n[OK] SHA512 verified\n```\n\n## Windows (MSVC)\n\nSee [README.md](./windows/README.md).\n\n## Linux\n\nMake sure there is a Pulsar service listened on `localhost:6650`. Then build the [./example.cc](example.cc) inside the Linux docker containers.\n\nThis project provides some Dockerfiles to:\n- Install the official released Linux packages into system paths\n- Build `dynamic.out` from [`example.cc`](./example.cc) by linking dynamically to `libpulsar.so`\n- Build `static.out` from [`example.cc`](./example.cc) by linking statically to `libpulsarwithdeps.a`\n\nThe executable accepts an argument that represents the service URL of Pulsar. If your host system is Linux, use `pulsar://172.17.0.1:6650`. If your host system is Windows or macOS, use `pulsar://host.docker.internal:6650`.\n\n### RPM\n\nVerify the official RPM packages inside a CentOS 7 docker container.\n\n```bash\ndocker build . -f ./centos-7/Dockerfile \\\n  --build-arg RELEASE_URL=https://dist.apache.org/repos/dist/dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.1.0-candidate-1/ \\\n  --build-arg ARCH=x86_64 \\\n  --build-arg VERSION=3.1.0 \\\n  -t pulsar-cpp-centos7\ndocker run -it --rm pulsar-cpp-centos7 /app/dynamic.out pulsar://172.17.0.1:6650\ndocker run -it --rm pulsar-cpp-centos7 /app/static.out pulsar://172.17.0.1:6650\n```\n\n### DEB\n\nVerify the official DEB packages inside a Ubuntu 20.04 docker container.\n\n```bash\ndocker build . -f ./ubuntu-20.04/Dockerfile \\\n  --build-arg RELEASE_URL=https://dist.apache.org/repos/dist/dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.1.0-candidate-1/ \\\n  --build-arg ARCH=x86_64 \\\n  -t pulsar-cpp-ubuntu-20.04\ndocker run -it --rm pulsar-cpp-ubuntu-20.04 /app/dynamic.out pulsar://172.17.0.1:6650\ndocker run -it --rm pulsar-cpp-ubuntu-20.04 /app/static.out pulsar://172.17.0.1:6650\n```\n\n### APK\n\nVerify the official APK packages inside a Alpine 3.17 docker container.\n\n```bash\n# Here we add --network=host to reuse the proxy on host.\n# See https://github.com/gliderlabs/docker-alpine/issues/445\ndocker build . -f ./alpine-3.17/Dockerfile \\\n  --network=host \\\n  --build-arg RELEASE_URL=https://dist.apache.org/repos/dist/dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.1.0-candidate-1/ \\\n  --build-arg ARCH=x86_64 \\\n  --build-arg VERSION=3.1.0 \\\n  -t pulsar-cpp-alpine-3.17\ndocker run -it --rm pulsar-cpp-alpine-3.17 /app/dynamic.out pulsar://172.17.0.1:6650\ndocker run -it --rm pulsar-cpp-alpine-3.17 /app/static.out pulsar://172.17.0.1:6650\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbewaremypower%2Fpulsar-client-cpp-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbewaremypower%2Fpulsar-client-cpp-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbewaremypower%2Fpulsar-client-cpp-demo/lists"}