You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "codelipenghui (via GitHub)" <gi...@apache.org> on 2025/06/03 23:53:52 UTC

Re: [PR] [fix][client] Fix consumer not returning encrypted messages on decryption failure with compression enabled [pulsar]

codelipenghui commented on code in PR #24356:
URL: https://github.com/apache/pulsar/pull/24356#discussion_r2125137202


##########
pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConsumerImpl.java:
##########
@@ -1921,11 +1923,53 @@ public long getLastDisconnectedTimestamp() {
         return connectionHandler.lastConnectionClosedTimestamp;
     }
 
-    private ByteBuf decryptPayloadIfNeeded(MessageIdData messageId, int redeliveryCount, MessageMetadata msgMetadata,
-                                           ByteBuf payload, ClientCnx currentCnx) {
+    /**
+     * Represents the outcome of a message decryption attempt for the consumer.
+     */
+    private static class DecryptResult {
+        private final boolean success;
+        private final ByteBuf decryptedPayload;

Review Comment:
   Is it better to use payload instead of decryptedPayload? Since it could be raw data when `success == true`



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