Open chriscameron-vertexinc opened 3 months ago
Reading messages using zero queue is a dedicated supported case (although batched messages are not supported following Java client). Pulsar.Client even has a set of tests specially for this type of consumer. You are welcome to create a PR with a failing test to fix.
Hello!
I'm using a Key_Shared topic to ensure no two consumers receive messages with the same key.
To avoid collisions when scaling consumers up/down I'm trying to set my receiver queue size to 0. I don't want to have any prefetch messages, I'd like to make sure I'm only ever consuming one message at a time.
When I produce messages to my topic the consumers throw the following exceptions:
Ok, so we can't read batched messages when only handling 1 message at a time.
When I disable batching on the producer side my consumer no-longer receives any messages at all. When I check pulsar-admin I can see my msgInCounter incrementing, but msgOutCounter never goes up.
As a workaround I've had to enable batching on the producer, and set the receive queue size to 1. Is this going to be adequate for my use case?