Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Doc] Add descriptions for C++ API doc (ProducerConfiguration.h) #9822

Merged
merged 6 commits into from
Mar 11, 2021

Conversation

Anonymitaet
Copy link
Member

Add docs for #9282, which fix the issue partly.

@Anonymitaet Anonymitaet added the doc Your PR contains doc changes, no matter whether the changes are in markdown or code files. label Mar 5, 2021
@Anonymitaet Anonymitaet added this to the 2.8.0 milestone Mar 5, 2021
@Anonymitaet Anonymitaet self-assigned this Mar 5, 2021
@Anonymitaet
Copy link
Member Author

@BewareMyPower could you please help review? Thanks

Copy link
Contributor

@BewareMyPower BewareMyPower left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here's the preview after this change.

image

pulsar-client-cpp/include/pulsar/ProducerConfiguration.h Outdated Show resolved Hide resolved
@Anonymitaet
Copy link
Member Author

@jennifer88huang @Huanli-Meng could you please help review? Thanks

Copy link
Contributor

@Huanli-Meng Huanli-Meng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

leave my comments. PTAL

@Anonymitaet
Copy link
Member Author

@Huanli-Meng thanks for your comments, I've incorporated them, PTAL.

@BewareMyPower
Copy link
Contributor

You need to format your code using clang-format.

Here's the diff you can git apply:

diff --git a/pulsar-client-cpp/include/pulsar/ProducerConfiguration.h b/pulsar-client-cpp/include/pulsar/ProducerConfiguration.h
index c681461ab6a..085d342d763 100644
--- a/pulsar-client-cpp/include/pulsar/ProducerConfiguration.h
+++ b/pulsar-client-cpp/include/pulsar/ProducerConfiguration.h
@@ -229,8 +229,8 @@ class PULSAR_PUBLIC ProducerConfiguration {
      */
     const MessageRoutingPolicyPtr& getMessageRouterPtr() const;
 
-    /** 
-     * Set the hashing scheme, which is a standard hashing function available when choosing the partition 
+    /**
+     * Set the hashing scheme, which is a standard hashing function available when choosing the partition
      * used for a particular message.
      *
      * <p>Standard hashing functions available are:
@@ -269,10 +269,10 @@ class PULSAR_PUBLIC ProducerConfiguration {
      * Control whether automatic batching of messages is enabled or not for the producer. <i>Default value:
      * false (no automatic batching).</i>
      *
-     * When automatic batching is enabled, multiple calls to Producer::sendAsync can result in a single batch to be sent
-     * to the broker, leading to better throughput, especially when publishing small messages. If compression
-     * is enabled, messages are compressed at the batch level, leading to a much better compression ratio for
-     * similar headers or contents.
+     * When automatic batching is enabled, multiple calls to Producer::sendAsync can result in a single batch
+     * to be sent to the broker, leading to better throughput, especially when publishing small messages. If
+     * compression is enabled, messages are compressed at the batch level, leading to a much better
+     * compression ratio for similar headers or contents.
      *
      * When the default batch delay is set to 10 ms and the default batch size is 1000 messages.
      *

@Anonymitaet
Copy link
Member Author

@BewareMyPower many thanks for your guidance! Previously I used the clang-format to format the file, seems that it did nothing. And then I tried it again, it works! :-D
Now the doc is formated.

@Anonymitaet Anonymitaet merged commit 412e4fc into apache:master Mar 11, 2021
@Anonymitaet Anonymitaet deleted the 0305 branch March 11, 2021 02:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Your PR contains doc changes, no matter whether the changes are in markdown or code files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants