You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by mm...@apache.org on 2019/03/04 19:28:21 UTC

[pulsar] branch master updated: add cli client consumer for standalone (#3697)

This is an automated email from the ASF dual-hosted git repository.

mmerli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar.git


The following commit(s) were added to refs/heads/master by this push:
     new e06a894  add cli client consumer for standalone (#3697)
e06a894 is described below

commit e06a894c1a99719861c7bb55806d2e22c2203b9b
Author: snow4young <ze...@bytedance.com>
AuthorDate: Tue Mar 5 03:28:16 2019 +0800

    add cli client consumer for standalone (#3697)
---
 .../version-2.3.0/getting-started-standalone.md           | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/site2/website/versioned_docs/version-2.3.0/getting-started-standalone.md b/site2/website/versioned_docs/version-2.3.0/getting-started-standalone.md
index 68d80b1..0fc4ba4 100644
--- a/site2/website/versioned_docs/version-2.3.0/getting-started-standalone.md
+++ b/site2/website/versioned_docs/version-2.3.0/getting-started-standalone.md
@@ -206,6 +206,21 @@ If the message has been successfully published to the topic, you should see a co
 > #### No need to explicitly create new topics
 > You may have noticed that we did not explicitly create the `my-topic` topic to which we sent the `hello-pulsar` message. If you attempt to write a message to a topic that does not yet exist, Pulsar will automatically create that topic for you.
 
+## Using CLI pulsar clients 
+
+Pulsar provides a CLI tool called [`pulsar-client`](reference-cli-tools.md#pulsar-client) that enables you to do things like receive messages from a Pulsar topic in a running cluster. This command will receive a simple message saying `hello-pulsar` to the `my-topic` topic:
+
+```bash
+$ bin/pulsar-client consume my-topic -t Shared -s demo-sub -n 0
+```
+
+If the message has been successfully published to the topic as above, you should see a confirmation like this in the `pulsar-client` logs:
+
+```
+----- got message -----
+hello-pulsar
+```
+
 ## Using Pulsar clients locally
 
 Pulsar currently offers client libraries for [Java](client-libraries-java.md),  [Go](client-libraries-go.md), [Python](client-libraries-python.md) and [C++](client-libraries-cpp.md). If you're running a local standalone cluster, you can use one of these root URLs for interacting with your cluster: