Anonymitaet commented on code in PR #589:
URL: https://github.com/apache/pulsar-site/pull/589#discussion_r1213846600
##########
docs/client-libraries-producers.md:
##########
@@ -78,37 +101,22 @@ This example shows how to send messages using producers.
```go
msg := pulsar.ProducerMessage{
- Payload: []byte("Here is some message data"),
- Key: "message-key",
- Properties: map[string]string{
- "foo": "bar",
- },
- EventTime: time.Now(),
- ReplicationClusters: []string{"cluster1", "cluster3"},
+ Payload: []byte("my-sync-message"),
}
if _, err := producer.send(msg); err != nil {
log.Fatalf("Could not publish message due to: %v", err)
}
```
- For all methods of the `ProducerMessage` object, see
[here](https://pkg.go.dev/github.com/apache/pulsar-client-go/pulsar#ProducerMessage).
+ For all methods of the `ProducerMessage` object, see
[here](https://pkg.go.dev/github.com/apache/pulsar-client-go/pulsar#ProducerMessage).
Review Comment:
```suggestion
For all methods of the `ProducerMessage` object, see [Go API
doc](https://pkg.go.dev/github.com/apache/pulsar-client-go/pulsar#ProducerMessage).
```
Show the doc name explicitly instead of "here" for screen readers'
convenience.
##########
docs/client-libraries-producers.md:
##########
@@ -41,33 +52,45 @@ Producer<String> producer =
pulsarClient.newProducer(Schema.STRING)
</Tabs>
````
-## Send messages
+## Publish messages
+
+This example shows how to publish messages using producers. The publish
operation will be done until the broker tells us that the message has been
successfully published. It will return the message id after the message is
published successfully.
Review Comment:
```suggestion
This example shows how to publish messages using producers. The publish
operation is done until the broker tells you the message has been successfully
published. Pulsar returns the message ID after the message is published
successfully.
```
1. Who returns the msg ID? Pulsar? Need to specify
2. Writing style:
a. Write in the simple present tense as much as possible if you are covering
facts that were, are, and forever shall be true.
https://docs.google.com/document/d/1lc5j4RtuLIzlEYCBo97AC8-U_3Erzs_lxpkDuseU0n4/edit#bookmark=id.e8uqh1awkcnp
b. Avoid the first-person pronouns I and we
https://docs.google.com/document/d/1lc5j4RtuLIzlEYCBo97AC8-U_3Erzs_lxpkDuseU0n4/edit#bookmark=id.hyip4lzbapvm
##########
docs/client-libraries-producers.md:
##########
@@ -41,33 +52,45 @@ Producer<String> producer =
pulsarClient.newProducer(Schema.STRING)
</Tabs>
````
-## Send messages
+## Publish messages
+
+This example shows how to publish messages using producers. The publish
operation will be done until the broker tells us that the message has been
successfully published. It will return the message id after the message is
published successfully.
Review Comment:
+1
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]