You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/09/27 20:26:50 UTC

[GitHub] [pulsar] DaveDuggins opened a new pull request, #17863: [doc][improve] update concepts-messaging.md

DaveDuggins opened a new pull request, #17863:
URL: https://github.com/apache/pulsar/pull/17863

   ### Motivation
   
   Updated concepts-messaging.md with new screen shots. Minor edits to ensure text matches.
   
   ### Modifications
   
   Edited concepts-messaging.md
   
   ### Verifying this change
   
   - [ ] Make sure that the change passes the CI checks.
   
   *(Please pick either of the following options)*
   
   This change is a trivial rework / code cleanup without any test coverage.
   
   *(or)*
   
   This change is already covered by existing tests, such as *(please describe tests)*.
   
   *(or)*
   
   This change added tests and can be verified as follows:
   
   *(example:)*
     - *Added integration tests for end-to-end deployment with large payloads (10MB)*
     - *Extended integration test for recovery after broker failure*
   
   ### Does this pull request potentially affect one of the following parts:
   
   *If the box was checked, please highlight the changes*
   
   - [ ] Dependencies (add or upgrade a dependency)
   - [ ] The public API
   - [ ] The schema
   - [ ] The default values of configurations
   - [ ] The binary protocol
   - [ ] The REST endpoints
   - [ ] The admin CLI options
   - [ ] Anything that affects deployment
   
   ### Documentation
   
   <!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. -->
   
   - [ ] `doc-required` 
   (Your PR needs to update docs and you will update later)
   
   - [ ] `doc-not-needed` 
   (Please explain why)
   
   - [ ] `doc` 
   (Your PR contains doc changes)
   
   - [ ] `doc-complete`
   (Docs have been already added)
   
   ### Matching PR in forked repository
   
   PR in forked repository: <!-- ENTER URL HERE 
   
   After opening this PR, the build in apache/pulsar will fail and instructions will
   be provided for opening a PR in the PR author's forked repository.
   
   apache/pulsar pull requests should be first tested in your own fork since the 
   apache/pulsar CI based on GitHub Actions has constrained resources and quota.
   GitHub Actions provides separate quota for pull requests that are executed in 
   a forked repository.
   
   The tests will be run in the forked repository until all PR review comments have
   been handled, the tests pass and the PR is approved by a reviewer.
   
   -->
   


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] DaveDuggins commented on pull request #17863: [doc][improve] update concepts-messaging.md

Posted by GitBox <gi...@apache.org>.
DaveDuggins commented on PR #17863:
URL: https://github.com/apache/pulsar/pull/17863#issuecomment-1260254684

   Attaching .svg files.
   ![pub-sub-border](https://user-images.githubusercontent.com/94193423/192663316-9ca19ba8-c99c-4c57-b515-874a94d65c31.svg)
   ![delayed-delivery](https://user-images.githubusercontent.com/94193423/192663317-b32f84c2-3941-457b-8a9f-2ba67dfe92c0.svg)
   ![message-deduplication](https://user-images.githubusercontent.com/94193423/192663318-251eb1ee-2b2d-4a06-80e6-62b11ec54ae2.svg)
   ![retention-expiry](https://user-images.githubusercontent.com/94193423/192663319-266ec11e-0d47-4024-a6b7-0fc7814ad7a2.svg)
   ![consumer](https://user-images.githubusercontent.com/94193423/192663320-db27b79e-4bec-4c86-bf98-fcc8e9637e49.svg)
   ![batching](https://user-images.githubusercontent.com/94193423/192663321-aeec208d-8723-49a5-ba62-722bf4c1c08b.svg)
   
   


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] Anonymitaet commented on a diff in pull request #17863: [doc][improve] update concepts-messaging.md

Posted by GitBox <gi...@apache.org>.
Anonymitaet commented on code in PR #17863:
URL: https://github.com/apache/pulsar/pull/17863#discussion_r981825528


##########
site2/docs/concepts-messaging.md:
##########
@@ -170,6 +184,8 @@ If the consumer fails to receive all chunks of a message within a specified peri
 
 A consumer is a process that attaches to a topic via a subscription and then receives messages.
 
+![Consumer](/assets/consumer.svg

Review Comment:
   ```suggestion
   ![Consumer](/assets/consumer.svg)
   ```



-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] github-actions[bot] commented on pull request #17863: [doc][improve] update concepts-messaging.md

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #17863:
URL: https://github.com/apache/pulsar/pull/17863#issuecomment-1260010740

   @DaveDuggins Please add the following content to your PR description and select a checkbox:
   ```
   - [ ] `doc` <!-- Your PR contains doc changes -->
   - [ ] `doc-required` <!-- Your PR changes impact docs and you will update later -->
   - [ ] `doc-not-needed` <!-- Your PR changes do not impact docs -->
   - [ ] `doc-complete` <!-- Docs have been already added -->
   ```


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] merlimat merged pull request #17863: [doc][improve] update concepts-messaging.md

Posted by GitBox <gi...@apache.org>.
merlimat merged PR #17863:
URL: https://github.com/apache/pulsar/pull/17863


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] momo-jun commented on a diff in pull request #17863: [doc][improve] update concepts-messaging.md

Posted by GitBox <gi...@apache.org>.
momo-jun commented on code in PR #17863:
URL: https://github.com/apache/pulsar/pull/17863#discussion_r981864314


##########
site2/docs/concepts-messaging.md:
##########
@@ -958,3 +974,7 @@ The following is an example of delayed message delivery for a producer in Java:
 producer.newMessage().deliverAfter(3L, TimeUnit.Minute).value("Hello Pulsar!").send();
 ```
 
+![consumer](https://user-images.githubusercontent.com/94193423/192619010-cb1a5772-f0b8-4d40-b9f9-1df1c5d8ce68.svg)

Review Comment:
   @DaveDuggins I guess your intention is to commit the image files through this pull request, so the last 4 lines are not required in the content update. You only need to add the SVG files to your branch.



-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] tisonkun commented on a diff in pull request #17863: [doc][improve] update concepts-messaging.md

Posted by GitBox <gi...@apache.org>.
tisonkun commented on code in PR #17863:
URL: https://github.com/apache/pulsar/pull/17863#discussion_r990178789


##########
site2/docs/concepts-messaging.md:
##########
@@ -87,17 +89,29 @@ You can set producer access mode through Java Client API. For more information,
 
 ### Compression
 
-You can compress messages published by producers during transportation. Pulsar currently supports the following types of compression:
-
+Message compression can reduce message size by paying some CPU overhead. The Pulsar client supports the following compression types:
 * [LZ4](https://github.com/lz4/lz4)
 * [ZLIB](https://zlib.net/)
 * [ZSTD](https://facebook.github.io/zstd/)
-* [SNAPPY](https://google.github.io/snappy/)
+* [SNAPPY](https://google.github.io/snappy/). 
+ 
+Compression types are stored in the message metadata, so consumers can adopt different compression types automatically, as needed.
+
+The sample code below shows how to enable compression type for a producer:
+
+```
+client.newProducer()
+    .topic(“topic-name”) 
+    .compressionType(CompressionType.LZ4) 
+    .create();
+```
 
 ### Batching
 
 When batching is enabled, the producer accumulates and sends a batch of messages in a single request. The batch size is defined by the maximum number of messages and the maximum publish latency. Therefore, the backlog size represents the total number of batches instead of the total number of messages.
 
+![Batching](/assets/batching.svg)

Review Comment:
   Create issue at https://github.com/apache/pulsar/issues/17960. New patch can link there.



-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] DaveDuggins commented on pull request #17863: [doc][improve] update concepts-messaging.md

Posted by GitBox <gi...@apache.org>.
DaveDuggins commented on PR #17863:
URL: https://github.com/apache/pulsar/pull/17863#issuecomment-1265458658

   Local preview looks good. Note that all preview images are for the same page.
   
   <img width="1361" alt="Delayed delivery" src="https://user-images.githubusercontent.com/94193423/193592032-a5a19be6-e5c1-4e8a-ae70-6b83e8ff28c5.png">
   <img width="1361" alt="Persistent messaging" src="https://user-images.githubusercontent.com/94193423/193592036-b9dfdf48-9bd1-4dcc-859d-aa4a60c0103b.png">
   <img width="1361" alt="Namespace" src="https://user-images.githubusercontent.com/94193423/193592039-277dc67a-7fc3-44e4-a23d-ff056b0a9b2c.png">
   <img width="1361" alt="Key shared" src="https://user-images.githubusercontent.com/94193423/193592043-8889eb4a-cf44-4294-9417-543c97cd16e0.png">
   <img width="1361" alt="Shared" src="https://user-images.githubusercontent.com/94193423/193592051-7ea28fc0-bfa4-47b7-9cd5-628a07c7974f.png">
   <img width="1361" alt="Failover" src="https://user-images.githubusercontent.com/94193423/193592052-859b1769-fe9e-4689-ba85-60b782082df2.png">
   <img width="1361" alt="Exclusive" src="https://user-images.githubusercontent.com/94193423/193592059-ca38376a-c361-47d9-8301-71335b2edafa.png">
   <img width="1361" alt="Subscription" src="https://user-images.githubusercontent.com/94193423/193592067-abc48ce6-b8f0-4305-a819-443dc6052f22.png">
   <img width="1361" alt="Consumer" src="https://user-images.githubusercontent.com/94193423/193592075-88d04ac4-2571-464e-b80f-250b79bc955f.png">
   <img width="1361" alt="Batching" src="https://user-images.githubusercontent.com/94193423/193592081-351f9a40-3c04-46af-82ad-204a0885cf38.png">
   


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] DaveDuggins commented on a diff in pull request #17863: [doc][improve] update concepts-messaging.md

Posted by GitBox <gi...@apache.org>.
DaveDuggins commented on code in PR #17863:
URL: https://github.com/apache/pulsar/pull/17863#discussion_r985791674


##########
site2/docs/concepts-messaging.md:
##########
@@ -958,3 +974,7 @@ The following is an example of delayed message delivery for a producer in Java:
 producer.newMessage().deliverAfter(3L, TimeUnit.Minute).value("Hello Pulsar!").send();
 ```
 
+![consumer](https://user-images.githubusercontent.com/94193423/192619010-cb1a5772-f0b8-4d40-b9f9-1df1c5d8ce68.svg)

Review Comment:
   Understood.  Thanks Jun!



-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] tisonkun commented on a diff in pull request #17863: [doc][improve] update concepts-messaging.md

Posted by GitBox <gi...@apache.org>.
tisonkun commented on code in PR #17863:
URL: https://github.com/apache/pulsar/pull/17863#discussion_r990174850


##########
site2/docs/concepts-messaging.md:
##########
@@ -87,17 +89,29 @@ You can set producer access mode through Java Client API. For more information,
 
 ### Compression
 
-You can compress messages published by producers during transportation. Pulsar currently supports the following types of compression:
-
+Message compression can reduce message size by paying some CPU overhead. The Pulsar client supports the following compression types:
 * [LZ4](https://github.com/lz4/lz4)
 * [ZLIB](https://zlib.net/)
 * [ZSTD](https://facebook.github.io/zstd/)
-* [SNAPPY](https://google.github.io/snappy/)
+* [SNAPPY](https://google.github.io/snappy/). 
+ 
+Compression types are stored in the message metadata, so consumers can adopt different compression types automatically, as needed.
+
+The sample code below shows how to enable compression type for a producer:
+
+```
+client.newProducer()
+    .topic(“topic-name”) 
+    .compressionType(CompressionType.LZ4) 
+    .create();
+```
 
 ### Batching
 
 When batching is enabled, the producer accumulates and sends a batch of messages in a single request. The batch size is defined by the maximum number of messages and the maximum publish latency. Therefore, the backlog size represents the total number of batches instead of the total number of messages.
 
+![Batching](/assets/batching.svg)

Review Comment:
   @merlimat @Anonymitaet @urfreespace @momo-jun 
   
   Since @DaveDuggins doesn't upload these SVG files, the site build is currently broken: https://github.com/apache/pulsar-site/actions/runs/3204572728/jobs/5236018179.
   
   If @DaveDuggins can provide the files, I'm glad to help with submitting a patch. Otherwise, we may firstly revert this commit.



-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org