Pulsar is a distributed pub-sub messaging platform with a very flexible messaging model and an intuitive client API.
Learn more about Pulsar at https://pulsar.apache.org
- Horizontally scalable (Millions of independent topics and millions of messages published per second)
- Strong ordering and consistency guarantees
- Low latency durable storage
- Topic and queue semantics
- Load balancer
- Designed for being deployed as a hosted service:
- Multi-tenant
- Authentication
- Authorization
- Quotas
- Support mixing very different workloads
- Optional hardware isolation
- Keeps track of consumer cursor position
- REST API for provisioning, admin and stats
- Geo replication
- Transparent handling of partitioned topics
- Transparent batching of messages
This repository is the main repository of Apache Pulsar. Pulsar PMC also maintains other repositories for components in the Pulsar ecosystem, including connectors, adapters, and other language clients.
- Pulsar Connectors (bundled as pulsar-io)
- Pulsar Translation
- Pulsar SQL (Pulsar Presto Connector) (bundled as pulsar-sql)
- Ruby Client
Note:
When using Java versions, it is recommended to use a recent version of a particular Java release (17 or 21) with the most recent bug fixes and security patches. For example, the JVM bug JDK-8351933 can cause stability issues in Pulsar. JDK-8351933 was fixed in Java 17.0.17+ and Java 21.0.8+. Pulsar Docker images come with the most recent Java version at the time of release.
When using the Pulsar Java client, it is recommended to set specific system properties and JVM options to allow optimal performance.
| Component | Java Version |
|---|---|
| Broker | 21 |
| Functions / IO | 21 |
| CLI | 17 or 21 |
| Java Client | 17 or 21 |
Docker image Java runtime: 21
| Component | Java Version |
|---|---|
| Broker | 21 |
| Functions / IO | 21 |
| CLI | 17 or 21 |
| Java Client | 8, 11, 17 or 21 |
Docker image Java runtime: 21
| Component | Java Version |
|---|---|
| Broker | 17 |
| Functions / IO | 17 |
| CLI | 17 |
| Java Client | 8 or 11 or 17 |
Docker image Java runtime: 17
| Component | Java Version |
|---|---|
| Broker | 11 |
| Functions / IO | 11 |
| CLI | 8 or 11 |
| Java Client | 8 or 11 |
| Component | Java Version |
|---|---|
| All | 8 or 11 |
-
JDK
Pulsar Version JDK Version master and 4.0+ JDK 21 2.11 + JDK 17 2.8 / 2.9 / 2.10 JDK 11 2.7 - JDK 8 -
Maven 3.9.9+
-
zip
There is also a guide for setting up the tooling for building Pulsar.
Note:
This project includes a Maven Wrapper that can be used instead of a system-installed Maven. Use it by replacing
mvnby./mvnwon Linux andmvnw.cmdon Windows in the commands below.
Compile and install:
$ mvn install -DskipTestsCompile and install individual module
$ mvn -pl module-name (e.g: pulsar-broker) install -DskipTestsmvn install -Pcore-modules,-main -DskipTestsRun Unit Tests:
$ mvn testRun Individual Unit Test:
$ mvn -pl module-name (e.g: pulsar-client) test -Dtest=unit-test-name (e.g: ConsumerBuilderImplTest)Run Selected Test packages:
$ mvn test -pl module-name (for example, pulsar-broker) -Dinclude=org/apache/pulsar/**/*.javaStart standalone Pulsar service:
$ bin/pulsar standaloneCheck https://pulsar.apache.org for documentation and examples.
The commands used in the Apache Pulsar release process can be found in the release process documentation.
Here are some general instructions for building custom docker images:
- Docker images must be built with Java 8 for
branch-2.7or previous branches because of ISSUE-8445. - Java 11 is the recommended JDK version in
branch-2.8,branch-2.9andbranch-2.10. - Java 17 is the recommended JDK version in
branch-2.11,branch-3.0andbranch-3.3. - Java 21 is the recommended JDK version since
branch-4.0.
The following command builds the docker images apachepulsar/pulsar-all:latest and apachepulsar/pulsar:latest:
mvn clean install -DskipTests
# setting DOCKER_CLI_EXPERIMENTAL=enabled is required in some environments with older docker versions
export DOCKER_CLI_EXPERIMENTAL=enabled
mvn package -Pdocker,-main -am -pl docker/pulsar-all -DskipTestsAfter the images are built, they can be tagged and pushed to your custom repository. Here's an example of a bash script that tags the docker images with the current version and git revision and pushes them to localhost:32000/apachepulsar.
image_repo_and_project=localhost:32000/apachepulsar
pulsar_version=$(mvn initialize help:evaluate -Dexpression=project.version -pl . -q -DforceStdout)
gitrev=$(git rev-parse HEAD | colrm 10)
tag="${pulsar_version}-${gitrev}"
echo "Using tag $tag"
docker tag apachepulsar/pulsar-all:latest ${image_repo_and_project}/pulsar-all:$tag
docker push ${image_repo_and_project}/pulsar-all:$tag
docker tag apachepulsar/pulsar:latest ${image_repo_and_project}/pulsar:$tag
docker push ${image_repo_and_project}/pulsar:$tagRead https://pulsar.apache.org/contribute/setup-ide for setting up IntelliJ IDEA or Eclipse for developing Pulsar.
Note:
For how to make contributions to Pulsar documentation, see Pulsar Documentation Contribution Guide.
- The mailing lists are the primary contact for the Apache Pulsar project.
- Your email to the mailing list might be placed in a moderation queue if you haven't joined the mailing list by subscribing before posting.
Note
Please note that security-related issues or concerns should not be reported in public channels. Follow the instructions in the Security Policy to contact the ASF Security Team and the Apache Pulsar PMC directly.
| Name | Scope | Subscribe | Unsubscribe | Archives |
|---|---|---|---|---|
| users@pulsar.apache.org | User-related discussions | Subscribe | Unsubscribe | Archives |
| dev@pulsar.apache.org | Development-related discussions | Subscribe | Unsubscribe | Archives |
Pulsar slack channel at https://apache-pulsar.slack.com/
You can self-register at https://communityinviter.com/apps/apache-pulsar/apache-pulsar
If you find a security issue with Pulsar then please read the security policy. It is critical to avoid public disclosure.
To report a vulnerability for Pulsar, contact the Apache Security Team. When reporting a vulnerability to security@apache.org, you can copy your email to private@pulsar.apache.org to send your report to the Apache Pulsar Project Management Committee. This is a private mailing list.
https://github.com/apache/pulsar/security/policy contains more details.
Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
This distribution includes cryptographic software. The country in which you currently reside may have restrictions on the import, possession, use, and/or re-export to another country, of encryption software. BEFORE using any encryption software, please check your country's laws, regulations and policies concerning the import, possession, or use, and re-export of encryption software, to see if this is permitted. See The Wassenaar Arrangement for more information.
The U.S. Government Department of Commerce, Bureau of Industry and Security (BIS), has classified this software as Export Commodity Control Number (ECCN) 5D002.C.1, which includes information security software using or performing cryptographic functions with asymmetric algorithms. The form and manner of this Apache Software Foundation distribution makes it eligible for export under the License Exception ENC Technology Software Unrestricted (TSU) exception (see the BIS Export Administration Regulations, Section 740.13) for both object code and source code.
The following provides more details on the included cryptographic software: Pulsar uses the SSL library from Bouncy Castle written by http://www.bouncycastle.org.