Anonymitaet commented on a change in pull request #10045:
URL: https://github.com/apache/pulsar/pull/10045#discussion_r602206215
##########
File path: site2/docs/client-libraries-node.md
##########
@@ -125,9 +128,11 @@ Pulsar Node.js producers have the following methods
available:
| Method | Description | Return type |
| :----- | :---------- | :---------- |
-| `send(Object)` | Publishes a [message](#messages) to the producer's topic.
When the message is successfully acknowledged by the Pulsar broker, or an error
will be thrown, the Promise object run executor function. | `Promise<null>` |
-| `flush()` | Sends message from send queue to Pulser broker. When the message
is successfully acknowledged by the Pulsar broker, or an error will be thrown,
the Promise object run executor function. | `Promise<null>` |
-| `close()` | Closes the producer and releases all resources allocated to it.
If `close()` is called then no more messages will be accepted from the
publisher. This method will return Promise object, and when all pending publish
requests have been persisted by Pulsar then run executor function. If an error
is thrown, no pending writes will be retried. | `Promise<null>` |
+| `send(Object)` | Publishes a [message](#messages) to the producer's topic.
When the message is successfully acknowledged by the Pulsar broker, or an error
will be thrown, the Promise object whose result is the message ID runs executor
function. | `Promise<Object>` |
Review comment:
```suggestion
| `send(Object)` | Publishes a [message](#messages) to the producer's topic.
When the message is successfully acknowledged by the Pulsar broker, or an error
will be thrown, the Promise object whose result is the message ID runs executor
function. | `Promise<Object>` |
```
For the latter sentence, do you mean "When the message is successfully
acknowledged by the Pulsar broker or an error is thrown, the Promise object
whose result is the message ID runs executor function.
Use present tense if you are covering facts that were, are, and forever
shall be true. Always use the present tense in technical writing by default.
##########
File path: site2/docs/client-libraries-node.md
##########
@@ -125,9 +128,11 @@ Pulsar Node.js producers have the following methods
available:
| Method | Description | Return type |
| :----- | :---------- | :---------- |
-| `send(Object)` | Publishes a [message](#messages) to the producer's topic.
When the message is successfully acknowledged by the Pulsar broker, or an error
will be thrown, the Promise object run executor function. | `Promise<null>` |
-| `flush()` | Sends message from send queue to Pulser broker. When the message
is successfully acknowledged by the Pulsar broker, or an error will be thrown,
the Promise object run executor function. | `Promise<null>` |
-| `close()` | Closes the producer and releases all resources allocated to it.
If `close()` is called then no more messages will be accepted from the
publisher. This method will return Promise object, and when all pending publish
requests have been persisted by Pulsar then run executor function. If an error
is thrown, no pending writes will be retried. | `Promise<null>` |
+| `send(Object)` | Publishes a [message](#messages) to the producer's topic.
When the message is successfully acknowledged by the Pulsar broker, or an error
will be thrown, the Promise object whose result is the message ID runs executor
function. | `Promise<Object>` |
+| `flush()` | Sends message from send queue to Pulser broker. When the message
is successfully acknowledged by the Pulsar broker, or an error will be thrown,
the Promise object runs executor function. | `Promise<null>` |
+| `close()` | Closes the producer and releases all resources allocated to it.
If `close()` is called then no more messages will be accepted from the
publisher. This method will return Promise object, and when all pending publish
requests have been persisted by Pulsar then runs executor function. If an error
is thrown, no pending writes will be retried. | `Promise<null>` |
Review comment:
```suggestion
| `close()` | Closes the producer and releases all resources allocated to
it. If `close()` is called then no more messages will be accepted from the
publisher. This method will return Promise object, and when all pending publish
requests have been persisted by Pulsar then runs executor function. If an error
is thrown, no pending writes will be retried. | `Promise<null>` |
```
1. Use present tense if you are covering facts that were, are, and forever
shall be true. Always use the present tense in technical writing by default.
2. Shorten long sentences.
##########
File path: site2/docs/client-libraries-node.md
##########
@@ -125,9 +128,11 @@ Pulsar Node.js producers have the following methods
available:
| Method | Description | Return type |
| :----- | :---------- | :---------- |
-| `send(Object)` | Publishes a [message](#messages) to the producer's topic.
When the message is successfully acknowledged by the Pulsar broker, or an error
will be thrown, the Promise object run executor function. | `Promise<null>` |
-| `flush()` | Sends message from send queue to Pulser broker. When the message
is successfully acknowledged by the Pulsar broker, or an error will be thrown,
the Promise object run executor function. | `Promise<null>` |
-| `close()` | Closes the producer and releases all resources allocated to it.
If `close()` is called then no more messages will be accepted from the
publisher. This method will return Promise object, and when all pending publish
requests have been persisted by Pulsar then run executor function. If an error
is thrown, no pending writes will be retried. | `Promise<null>` |
+| `send(Object)` | Publishes a [message](#messages) to the producer's topic.
When the message is successfully acknowledged by the Pulsar broker, or an error
will be thrown, the Promise object whose result is the message ID runs executor
function. | `Promise<Object>` |
+| `flush()` | Sends message from send queue to Pulser broker. When the message
is successfully acknowledged by the Pulsar broker, or an error will be thrown,
the Promise object runs executor function. | `Promise<null>` |
+| `close()` | Closes the producer and releases all resources allocated to it.
If `close()` is called then no more messages will be accepted from the
publisher. This method will return Promise object, and when all pending publish
requests have been persisted by Pulsar then runs executor function. If an error
is thrown, no pending writes will be retried. | `Promise<null>` |
+| `getProducerName()` | Getter method of the name of the producer. | `string` |
Review comment:
Do you mean " Getter method of the producer name"?
##########
File path: site2/docs/client-libraries-node.md
##########
@@ -8,6 +8,8 @@ The Pulsar Node.js client can be used to create Pulsar
[producers](#producers),
All the methods in [producers](#producers), [consumers](#consumers), and
[readers](#readers) of a Node.js client are thread-safe.
+With version 1.3.0 or later, [type
definitions](https://github.com/apache/pulsar-client-node/blob/master/index.d.ts)
for use in TypeScript are available.
Review comment:
```suggestion
For 1.3.0 or later versions, [type
definitions](https://github.com/apache/pulsar-client-node/blob/master/index.d.ts)
used in TypeScript are available.
```
##########
File path: site2/docs/client-libraries-node.md
##########
@@ -389,6 +397,8 @@ The following keys are available for producer message
objects:
| `sequenceId` | The sequence ID of the message. |
| `partitionKey` | The optional key associated with the message (particularly
useful for things like topic compaction). |
| `replicationClusters` | The clusters to which this message will be
replicated. Pulsar brokers handle message replication automatically; you should
only change this setting if you want to override the broker default. |
+| `deliverAt` | The absolute timestamp at or after which the message is
delivered. | |
Review comment:
Include "after"?
##########
File path: site2/docs/client-libraries-node.md
##########
@@ -125,9 +128,11 @@ Pulsar Node.js producers have the following methods
available:
| Method | Description | Return type |
| :----- | :---------- | :---------- |
-| `send(Object)` | Publishes a [message](#messages) to the producer's topic.
When the message is successfully acknowledged by the Pulsar broker, or an error
will be thrown, the Promise object run executor function. | `Promise<null>` |
-| `flush()` | Sends message from send queue to Pulser broker. When the message
is successfully acknowledged by the Pulsar broker, or an error will be thrown,
the Promise object run executor function. | `Promise<null>` |
-| `close()` | Closes the producer and releases all resources allocated to it.
If `close()` is called then no more messages will be accepted from the
publisher. This method will return Promise object, and when all pending publish
requests have been persisted by Pulsar then run executor function. If an error
is thrown, no pending writes will be retried. | `Promise<null>` |
+| `send(Object)` | Publishes a [message](#messages) to the producer's topic.
When the message is successfully acknowledged by the Pulsar broker, or an error
will be thrown, the Promise object whose result is the message ID runs executor
function. | `Promise<Object>` |
+| `flush()` | Sends message from send queue to Pulser broker. When the message
is successfully acknowledged by the Pulsar broker, or an error will be thrown,
the Promise object runs executor function. | `Promise<null>` |
Review comment:
ditto
--
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:
[email protected]