Demogorgon314 commented on code in PR #21091:
URL: https://github.com/apache/pulsar/pull/21091#discussion_r1312640863
##########
pulsar-broker/src/main/java/org/apache/pulsar/client/impl/RawBatchMessageContainerImpl.java:
##########
@@ -44,16 +44,17 @@
* [(k1, v1), (k2, v1), (k3, v1), (k1, v2), (k2, v2), (k3, v2), (k1, v3), (k2,
v3), (k3, v3)]
*/
public class RawBatchMessageContainerImpl extends BatchMessageContainerImpl {
- MessageCrypto msgCrypto;
- Set<String> encryptionKeys;
- CryptoKeyReader cryptoKeyReader;
+ private MessageCrypto<MessageMetadata, MessageMetadata> msgCrypto;
+ private Set<String> encryptionKeys;
+ private CryptoKeyReader cryptoKeyReader;
+ private MessageIdImpl lastAddedMessageId;
- public RawBatchMessageContainerImpl(int maxNumMessagesInBatch, int
maxBytesInBatch) {
+ public RawBatchMessageContainerImpl() {
super();
this.compressionType = CompressionType.NONE;
this.compressor = new CompressionCodecNone();
- this.maxNumMessagesInBatch = maxNumMessagesInBatch;
- this.maxBytesInBatch = maxBytesInBatch;
+ this.maxNumMessagesInBatch = Integer.MAX_VALUE;
+ this.maxBytesInBatch = Integer.MAX_VALUE;
Review Comment:
The `isBatchFull` method will be used by
`org.apache.pulsar.client.impl.BatchMessageContainerImpl#add`, if we override
it, we need to override the `add` method as well.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]