We were releasing and acquiring again lock while fetching messages to reduce contention. This could cause a consumer getting stuck in certain scenarios, like when max messages per subject was set to 1 and message was republished while consumer was trying to NAK the first one.
We were releasing and acquiring again lock while fetching messages to reduce contention. This could cause a consumer getting stuck in certain scenarios, like when
max messages per subject
was set to1
and message was republished while consumer was trying toNAK
the first one.Signed-off-by: Tomasz Pietrek tomasz@nats.io