@@ -53,12 +53,35 @@ class PULSAR_PUBLIC EncryptionContext {
5353 EncryptionContext (const proto::MessageMetadata& metadata, bool isDecryptionFailed);
5454
5555 using KeysType = std::unordered_map<std::string, EncryptionKey>;
56+
57+ /* *
58+ * @return the map of encryption keys used for the message
59+ */
5660 const KeysType& keys () const noexcept { return keys_; }
61+
62+ /* *
63+ * @return the encryption parameter used for the message
64+ */
5765 const std::string& param () const noexcept { return param_; }
66+
67+ /* *
68+ * @return the encryption algorithm used for the message
69+ */
5870 const std::string& algorithm () const noexcept { return algorithm_; }
71+
72+ /* *
73+ * @return the compression type used for the message
74+ */
5975 CompressionType compressionType () const noexcept { return compressionType_; }
76+
77+ /* *
78+ * @return the uncompressed message size if the message is compressed, 0 otherwise
79+ */
6080 uint32_t uncompressedMessageSize () const noexcept { return uncompressedMessageSize_; }
61- // Returns the batch size if the message is part of a batch, -1 otherwise
81+
82+ /* *
83+ * @return the batch size if the message is part of a batch, -1 otherwise
84+ */
6285 int32_t batchSize () const noexcept { return batchSize_; }
6386
6487 /* *
@@ -71,11 +94,6 @@ class PULSAR_PUBLIC EncryptionContext {
7194 */
7295 bool isDecryptionFailed () const noexcept { return isDecryptionFailed_; }
7396
74- static const EncryptionContext& empty () {
75- static EncryptionContext context;
76- return context;
77- }
78-
7997 private:
8098 const KeysType keys_;
8199 const std::string param_;
0 commit comments