Apache Pulsar user-defined source and sink implemented using Java.
Prerequisites: This project requires Java 23
Note for Production: For StreamNative Cloud or secured clusters, see Pulsar on StreamNative
This starts a local Pulsar broker and the Pulsar Manager web interface for monitoring.
docker-compose up CSRF_TOKEN=$(curl http://localhost:7750/pulsar-manager/csrf-token)
curl \
-H "X-XSRF-TOKEN: $CSRF_TOKEN" \
-H "Cookie: XSRF-TOKEN=$CSRF_TOKEN;" \
-H "Content-Type: application/json" \
-X PUT http://localhost:7750/pulsar-manager/users/superuser \
-d '{"name": "admin", "password": "apachepulsar", "description": "test", "email": "[email protected]"}'
Go to http://localhost:9527/#/login?redirect=%2F and login with the name and password fields specified in the command above.
In Pulsar Manager, once logged in, create an environment with the service URL http://pulsar:8080/ and Bookie url http://pulsar:8080/.
Note: navigate to the docs folder, and go to either the sink/source subfolder (docs/source/byte-array/ or docs/sink/byte-array/) for example producer and consumer pipeline and configmap configurations. For local Pulsar cluster, you can omit the authPluginClassName and authParams fields for the config map implementation.
# Build the project and create the Docker image
mvn clean install
# Deploy the pipeline and configuration to Kubernetes
kubectl apply -f <path-to-pipeline.yaml>
kubectl apply -f <path-to-config-map.yaml>
# Port-forward to access Numaflow UI
kubectl -n numaflow-system port-forward deployment/numaflow-server 8443:8443Then access the Numaflow UI at https://localhost:8443/