shuoqingding opened a new issue, #21631:
URL: https://github.com/apache/pulsar/issues/21631

   ### Search before asking
   
   - [X] I searched in the [issues](https://github.com/apache/pulsar/issues) 
and found nothing similar.
   
   
   ### Version
   
   Java SDK Version: 2.7.4
   OS: Linux
   
   ### Minimal reproduce step
   
   1. create a producer with compressionType on
   2. create a consumer and call `batchReceiveAsync` with default 
`batchReceivePolicy` which has 10MB `maxSizeOfMessages`
   3. On the producer side, we send a message with  larger than 10MB whose 
compressed size should be less than broker limit (5MB limit), so the message 
can be sent successfully.
   
   ### What did you expect to see?
   
   the large message should be consumed and received in the callback of 
`batchReceivePolicy`
   
   ### What did you see instead?
   
   the large message never shown up in the callback.
   
   ### Anything else?
   
   Looking at the SDK code, we find if any message in `incommingMessages` queue 
is larger than `maxSizeOfMessages` (10MB by default), it will block this 
consumer unless the message is expired. So I wonder if this is the expected 
behavior and why?
   
   <img width="920" alt="image" 
src="https://github.com/apache/pulsar/assets/1393690/a84dde15-a1a0-4546-8638-fffb5db46157";>
   <img width="1004" alt="image" 
src="https://github.com/apache/pulsar/assets/1393690/d88d335d-8140-4941-aac4-89ccc8cb0b31";>
   
   
   
   ### Are you willing to submit a PR?
   
   - [X] I'm willing to submit a PR!


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

Reply via email to