You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2019/06/05 11:17:40 UTC

[GitHub] [pulsar] sxcooler opened a new issue #4481: a little change needed of pulsar cli

sxcooler opened a new issue #4481: a little change needed of pulsar cli
URL: https://github.com/apache/pulsar/issues/4481
 
 
   **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.
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services