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 2021/08/20 03:12:57 UTC

[GitHub] [pulsar] Anonymitaet commented on a change in pull request #11725: PIP 83 : Pulsar Reader: Message consumption with pooled buffer

Anonymitaet commented on a change in pull request #11725:
URL: https://github.com/apache/pulsar/pull/11725#discussion_r692627345



##########
File path: pulsar-client-api/src/main/java/org/apache/pulsar/client/api/ReaderBuilder.java
##########
@@ -280,4 +280,14 @@
      * @return the reader builder instance
      */
     ReaderBuilder<T> keyHashRange(Range... ranges);
+
+    /**
+     * Enable pooling of messages and the underlying data buffers.
+     * <p/>
+     * When pooling is enabled, the application is responsible for calling Message.release() after the handling of every
+     * received message. If “release()” is not called on a received message, there will be a memory leak. If an
+     * application attempts to use and already “released” message, it might experience undefined behavior (eg: memory
+     * corruption, deserialization error, etc.).

Review comment:
       ```suggestion
        * When pooling is enabled, the application is responsible for calling Message.release() after the handling of every
        * received message. If “release()” is not called on a received message, there will be a memory leak. If an
        * application attempts to use and already “released” message, it might experience undefined behavior (for example, memory
        * corruption, deserialization error, etc.).
   ```




-- 
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