{"id":30385280,"url":"https://github.com/bruce-mig/spring-apache-pulsar","last_synced_at":"2025-08-21T02:11:56.582Z","repository":{"id":303241388,"uuid":"1014814749","full_name":"bruce-mig/spring-apache-pulsar","owner":"bruce-mig","description":"Pub/Sub with Apache Pulsar","archived":false,"fork":false,"pushed_at":"2025-07-06T14:07:16.000Z","size":124,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-06T15:24:16.711Z","etag":null,"topics":["apache-pulsar","pub-sub","pulsar","spring-boot"],"latest_commit_sha":null,"homepage":"","language":"Java","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/bruce-mig.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,"zenodo":null}},"created_at":"2025-07-06T13:23:08.000Z","updated_at":"2025-07-06T14:07:20.000Z","dependencies_parsed_at":"2025-07-06T15:24:23.671Z","dependency_job_id":"c8c33398-ffac-43c0-837f-e91729801c69","html_url":"https://github.com/bruce-mig/spring-apache-pulsar","commit_stats":null,"previous_names":["bruce-mig/spring-apache-pulsar"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bruce-mig/spring-apache-pulsar","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bruce-mig%2Fspring-apache-pulsar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bruce-mig%2Fspring-apache-pulsar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bruce-mig%2Fspring-apache-pulsar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bruce-mig%2Fspring-apache-pulsar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bruce-mig","download_url":"https://codeload.github.com/bruce-mig/spring-apache-pulsar/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bruce-mig%2Fspring-apache-pulsar/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271415496,"owners_count":24755639,"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","status":"online","status_checked_at":"2025-08-21T02:00:08.990Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["apache-pulsar","pub-sub","pulsar","spring-boot"],"created_at":"2025-08-21T02:11:52.622Z","updated_at":"2025-08-21T02:11:56.577Z","avatar_url":"https://github.com/bruce-mig.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# spring-apache-pulsar\n\nPub/Sub with Apache Pulsar using Spring Boot\n\n---\n\n## Overview\n\nThis project demonstrates how to integrate [Apache Pulsar](https://pulsar.apache.org/) with a Spring Boot application to implement pub/sub messaging. It provides a local Pulsar cluster setup via Docker Compose, code samples for producing and consuming messages, and useful references for managing Pulsar clusters and users.\n\n---\n\n## Features\n\n- **Local Pulsar cluster** setup with Docker Compose (both standalone and multi-node options)\n- **Spring Boot integration** for producing and consuming Pulsar messages\n- **Swagger UI** for testing API endpoints\n- Pulsar Manager UI for cluster/user management\n\n---\n\n## Prerequisites\n\n- [Docker](https://www.docker.com/) \u0026 [Docker Compose](https://docs.docker.com/compose/)\n- Java 17+ and Maven (for Spring Boot app)\n- Optional: [Pulsar Manager](https://github.com/apache/pulsar-manager) for UI management\n\n---\n\n## Getting Started\n\n### 1. Clone the repository\n\n```bash\ngit clone https://github.com/bruce-mig/spring-apache-pulsar.git\ncd spring-apache-pulsar\n```\n\n### 2. Set up Pulsar cluster\n\nCreate data directories (Linux):\n\n```bash\nsudo mkdir -p ./data/zookeeper ./data/bookkeeper\nsudo chown -R 10000 data\n```\n\nStart multi-node Pulsar cluster:\n\n```bash\ndocker compose -f cluster-compose.yaml up -d\n```\n\nOr, for standalone mode:\n\n```bash\ndocker compose -f standalone-compose.yaml up -d\n```\n\nAccess Pulsar Manager UI at: http://localhost:9527\n\n### 3. Create Admin user\n\n```bash\nCSRF_TOKEN=$(curl http://localhost:7750/pulsar-manager/csrf-token)\n\ncurl \\\n-H \"X-XSRF-TOKEN: $CSRF_TOKEN\" \\\n-H \"Cookie: XSRF-TOKEN=$CSRF_TOKEN;\" \\\n-H \"Content-Type: application/json\" \\\n-X PUT http://localhost:7750/pulsar-manager/users/superuser \\\n-d '{\"name\": \"admin\", \"password\": \"apachepulsar\", \"description\": \"test\", \"email\": \"username@test.org\"}'\n```\n\n## Application Usage\n#### 1. Build \u0026 Run Spring Boot App\n```bash\n# producer\ncd producer\n./mvnw spring-boot:run\n\n# consumer\ncd consumer\n./mvnw spring-boot:run\n```\n\n#### 2. Access API Documentation\nSwagger UI: http://localhost:9191/swagger-ui/index.html\n\n---\n\n##  Apache Pulsar Architecture\n![pulsar](pulsar.png)\n\n---\n## Project Structure\n\n- producer: Spring Boot source code for Pulsar producer  \n- consumer: Spring Boot source code for Pulsar consumer  \n- commons: Commons package  \n- cluster-compose.yaml, standalone-compose.yaml: Docker Compose configurations  \n- data/: Volume mounts for Pulsar/ZooKeeper/BookKeeper data  \n- pulsar.png: Architecture diagram  \n\n## References\n[Apache Pulsar Documentation](https://pulsar.apache.org/docs/)  \n[Spring for Apache Pulsar](https://spring.io/projects/spring-pulsar)  \n[Pulsar Manager](https://github.com/apache/pulsar-manager)  \n\n## License\nThis project is licensed under the [MIT License](LICENCE).  \n\n## Contributing\nContributions are welcome! Please open issues or submit pull requests for improvements or bug fixes.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbruce-mig%2Fspring-apache-pulsar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbruce-mig%2Fspring-apache-pulsar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbruce-mig%2Fspring-apache-pulsar/lists"}