Soumya Ghosh
03/13/2025, 4:23 PMRunLLM
03/13/2025, 4:23 PMpulsar-client CLI command, you need to specify the --url option followed by the broker service URL. This URL is used to connect the client to the Pulsar broker for producing or consuming messages. Here's an example of how to use it:
bin/pulsar-client produce \
--url pulsar://broker.example.com:6650 \
-m "Hello Pulsar" \
my-topic
In this example, pulsar://broker.example.com:6650 is the broker service URL, and my-topic is the topic to which the message "Hello Pulsar" is being sent. You can replace broker.example.com:6650 with the actual broker address and port you are using.
Would you like more details on using the pulsar-client CLI?
Sources:
- https://pulsar.apache.org/docs/3.2.x/functions-deploy-localrun
- https://pulsar.apache.org/docs/3.2.x/client-libraries-python-setup 👍 0 button 👎 1 button 💡 Hint: Mention @RunLLM in the thread for followups.Soumya Ghosh
03/13/2025, 4:25 PMRunLLM
03/13/2025, 4:25 PMpulsar-client CLI tool does not support the --url option for the read command. Instead, the service URL is typically specified in the client.conf configuration file. You can set the brokerServiceUrl in this file to point to your desired broker. Here's an example of how to configure it:
1. Open the client.conf file located in the conf directory of your Pulsar installation.
2. Set the brokerServiceUrl to your broker's URL:
brokerServiceUrl=pulsar://broker.example.com:6650
3. Use the pulsar-client read command without the --url option:
bin/pulsar-client read my-topic -n 10
This command will read messages from my-topic using the broker URL specified in the client.conf file.
Would you like more information on configuring the pulsar-client?
Sources:
- https://github.com/apache/pulsar/issues/23741
- https://github.com/apache/pulsar/blob/master/pulsar-client-tools/src/main/java/org/apache/pulsar/client/cli/PulsarClientTool.java 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.Lari Hotari
03/13/2025, 4:44 PMLari Hotari
03/13/2025, 4:47 PMSoumya Ghosh
03/13/2025, 9:45 PMbin/pulsar-client \
--url pulsar://broker.example.com:6650 \
read \
my-topic \
-m earliest \
-n 10
whereas I was trying to pass the --url option after read sub-command.