lhotari commented on code in PR #24610:
URL: https://github.com/apache/pulsar/pull/24610#discussion_r2260877320
##########
pulsar-client/src/main/java/org/apache/pulsar/client/impl/ZeroQueueConsumerImpl.java:
##########
@@ -196,6 +196,29 @@ void
receiveIndividualMessagesFromBatch(BrokerEntryMetadata brokerEntryMetadata,
int redeliveryCount, List<Long>
ackSet, ByteBuf uncompressedPayload,
MessageIdData messageId, ClientCnx
cnx, long consumerEpoch,
boolean isEncrypted) {
+ rejectBatchMessageByClosingConsumer();
+ }
+
+ @Override
+ protected void setCurrentReceiverQueueSize(int newSize) {
+ //receiver queue size is fixed as 0.
+ throw new NotImplementedException("Receiver queue size can't be
changed in ZeroQueueConsumerImpl");
+ }
+
+ @Override
+ protected void processPayloadByProcessor(BrokerEntryMetadata
brokerEntryMetadata,
+ MessageMetadata messageMetadata,
ByteBuf byteBuf,
+ MessageIdImpl messageId,
Schema<T> schema,
+ int redeliveryCount, List<Long>
ackSet, long consumerEpoch) {
+ if (this.isBatch(messageMetadata)) {
+ rejectBatchMessageByClosingConsumer();
+ } else {
+ super.processPayloadByProcessor(brokerEntryMetadata,
messageMetadata, byteBuf, messageId, schema,
+ redeliveryCount, ackSet, consumerEpoch);
+ }
+ }
+
+ private void rejectBatchMessageByClosingConsumer() {
Review Comment:
Please pass the message id to this method so that it could be logged.
improve the warning log message so that the message id is logged. This would
help investigate the issue if someone happens to encounter this problem.
--
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]