michaeljmarshall commented on issue #19320:
URL: https://github.com/apache/pulsar/issues/19320#issuecomment-1404117963

   After digging into the reproducer, I found an explanation for the behavior. 
The difference between 2.10.3 and 2.11.0 is because we stopped wrapping single 
messages in batch message envelopes as of PIP 189 
https://github.com/apache/pulsar/issues/16619, which was introduced in 2.11.0.
   
   In the 2.10.3 test, note that the logs contain this log line:
   
   > 2023-01-25T13:07:25,151-0600 [pulsar-client-io-36-1] WARN  
org.apache.pulsar.client.impl.ZeroQueueConsumerImpl - Closing consumer 
[camel-subscription]-[camel-consumer] due to unsupported received batch-message 
with zero receiver queue size
   
   In the 2.11.0 test, we do not log this exception because the message is a 
single message.
   
   A few notes:
   
   1. The first thing I notice in the reproducer is that the consumer is 
started, `receive()` is called, and then `pause()` is called. This ordering 
results in the consumer sending a request for messages to the server in both 
2.10.3 and 2.11.0. In both versions, the server responds with a message.
   2. The test for 2.10.3 fails when the producer is configured with 
`.enableBatching(false)`.
   3. Perhaps the meaning of `pause` is ambiguous. From reading the code, the 
current meaning is best described as "do not send any more permits to the 
broker". As such, in flight requests for messages and messages in the internal 
`receiveQueue` are eligible to receive (this logic applies to both ZeroQueue 
consumers and consumers with a receive queue).
   
   @Croway - I think it the underlying issue is that the test described in 
https://issues.apache.org/jira/projects/CAMEL/issues/CAMEL-18974 was implicitly 
relying on the zero queue failing due to message batching, and the test would 
have failed if the producer had not batched the message. It might be the case 
that the test needs to improve.
   


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