================= Using Pulsar CLI tools ========...
# general
g
================= Using Pulsar CLI tools ================= According to docs: "All Pulsar command-line tools can be run from the
bin
directory of your installed Pulsar package" I am going to develop client application for Pulsar. But Pulsar will be within Docker container. During development I'd like to use Pulsar CLI tools without installation of Pulsar package. Is it possible? Thanks =================
a
Yes, if you open an interactive shell to the docker container, you can issue the commands from inside
👍 1
d
Another option is to run the Pulsar binaries locally and configure the
admin-url
and/or
broker-url
properties inside your
conf/client.conf
to point to your Pulsar instance running in Docker. For example,
./bin/pulsar-admin --admin-url http://<DOCKER IP>:8080 tenants list
👍 1
Or
./bin/pulsar-client --url pulsar://<DOCKER-IP>:6650 consume -n 0 -s sub public/default/topic
k
@David K Wanted to ask it for some time. Is there any specific reason that /pulsar/bin isn’t added to $PATH? What the point to typing ./bin/xxx instead of xxx?
d
Since PATH is controlled by a users profile, e.g.,
.bashrc
, I try not to make any assumptions about the contents of the $PATH
k
I mean the default container PATH
d
Ah…. There isn’t a reason for not adding the
/pulsar/bin
directory to the container’s PATH variable.
k
Yep. I think it would make sense to have /pulsar/bin in $PATH by default
👍 2