This is an automated email from the ASF dual-hosted git repository.
massakam pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar-client-node.wiki.git
The following commit(s) were added to refs/heads/master by this push:
new bfd76c8 Updated Release process (markdown)
bfd76c8 is described below
commit bfd76c8118c71b8e6722acb7c83fcd2a2d0e75bd
Author: Masahiro Sakamoto <[email protected]>
AuthorDate: Thu Aug 29 14:21:51 2019 +0900
Updated Release process (markdown)
---
Release-process.md | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++--
1 file changed, 52 insertions(+), 2 deletions(-)
diff --git a/Release-process.md b/Release-process.md
index a2c33a8..0cd2470 100644
--- a/Release-process.md
+++ b/Release-process.md
@@ -89,11 +89,61 @@ $ bin/pulsar standalone
# Open a new terminal and subscribe my-topic
$ cd /path/to/pulsar-client-node
-$ node examples/consumer.js
+$ node consumer.js
+
+###### consumer.js example ######
+const Pulsar = require('./index.js');
+
+(async () => {
+ const client = new Pulsar.Client({
+ serviceUrl: 'pulsar://localhost:6650',
+ });
+
+ const consumer = await client.subscribe({
+ topic: 'persistent://public/default/my-topic',
+ subscription: 'sub1',
+ });
+
+ for (let i = 0; i < 10; i += 1) {
+ const msg = await consumer.receive();
+ console.log(msg.getData().toString());
+ consumer.acknowledge(msg);
+ }
+
+ await consumer.close();
+ await client.close();
+})();
+#################################
# Open another new terminal to produce messages into my-topic
$ cd /path/to/pulsar-client-node
-$ node examples/producer.js
+$ node producer.js
+
+###### producer.js example ######
+const Pulsar = require('./index.js');
+
+(async () => {
+ const client = new Pulsar.Client({
+ serviceUrl: 'pulsar://localhost:6650',
+ });
+
+ const producer = await client.createProducer({
+ topic: 'persistent://public/default/my-topic',
+ });
+
+ for (let i = 0; i < 10; i += 1) {
+ const msg = `my-message-${i}`;
+ producer.send({
+ data: Buffer.from(msg),
+ });
+ console.log(`Sent message: ${msg}`);
+ }
+ await producer.flush();
+
+ await producer.close();
+ await client.close();
+})();
+#################################
```
#### 4. Publish the release candidate package