question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

a little change needed of pulsar cli

See original GitHub issue

Is your feature request related to a problem? Please describe. When I tried to use pulsar cli to test my code, send a json string to a topic, like this:

./pulsar-client produce my-topic --messages '{"appId":"test","userId":38,"phone":"13800138000","score":664}'

But the default behavior of pulsar-client produce is use comma as separator to divide messages, so my json divided into several messages which I didn’t want to, like this:

19:06:03.742 [main] INFO  org.apache.pulsar.client.cli.PulsarClientTool - 4 messages successfully produced

And I couldn’t find any way to escape the comma(backslash / double backslash did not work). And after that I try to put the json into a file and use -f option, like:

./pulsar-client produce my-topic -f ./test.json

And I got

java.nio.file.NoSuchFileException: ./test.json

So I had to use the full path.

Describe the solution you’d like

  • Do not use comma as default separator in cli, or at least tell users how to escape it in the command line help.
  • Support relative path in cli as other clis.

Describe alternatives you’ve considered I can’t imagine.

Additional context none.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
dmi-kovcommented, Jan 24, 2020

hey @liketic, I’ve got the same issue on the latest (2.5.0) version of Pulsar.

0reactions
eladchencommented, Mar 3, 2020

Hi,

This still appears to be broken (using version 2.5.0)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Pulsar command-line tools
The pulsar tool is used to start Pulsar components, such as bookies and ZooKeeper, in the foreground. These processes can also be started...
Read more >
Apache Pulsar Client Application Best Practices - StreamNative
In this blog post, I will provide an in-depth review of the internal details of Apache Pulsar producers and consumers.
Read more >
Transform Functions :: DataStax Streaming Docs
A Pulsar transform function is a low-code implementation of Pulsar functions. ... The transform function will initialize and begin processing data changes.
Read more >
BUYERS GUIDE: CLIP-ON THERMALS - Pulsar
I don't need to reach for the spotting scope when shooting out to 200m. But even at 3x, the magnification is just a...
Read more >
How To Change A Watch Battery - Watch and Learn #43
Today's episode of Watch and Learn helps you with something we can all relate to. You go to put on your battery operated...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found