Demonstrates how to use the Apache Pulsar Pub/Sub messaging service using the C# client library.
- Clone this repository
- Execute the following script to up the Apache P Pulsar service using Docker Compose:
chmod +x ./scripts/deploy-local-environment.sh
./scripts/deploy-local-environment.sh
- Run the
Producer
project:
dotnet run --project src/Producer
- Run the
Consumer
project:
dotnet run --project src/Consumer
- Make a request to the
Producer API
project to send a message to the Pulsar broker:
curl -X POST "http://<host>/api/messages" -H "Content-Type: application/json" -d '{"content": "Hello, Pulsar!"}'