Fill a queue up with some messages (some > 1). Create a receiver with capacity=1. Call fetch() in a loop with timeout=0.
Expect to get all the messages that were on the queue to start with. Only get the first message.
It appears to be a result of the client not restoring its credit correctly after the first flush.