[EventHubs] update sync receive client ready flow
When reading from 32 partitions, the sync consumers were taking a long time to connect, b/c the client ready check was happening in a while loop. Each consumer was blocking while checking that the client was ready. Overall, this resulted in very slow connection times for the consumer client.
This is updating the consumers so that the client ready check is no longer blocking.
/azp run python - eventhub - tests
Azure Pipelines successfully started running 1 pipeline(s).
API change check
APIView has identified API level changes in this PR and created following API reviews.
Awesome thanks for this! Is there any investigation needed for async? Or the producers? (If so, we could probably open issues to address as needed). The live tests were all good?
Going to run the live tests on this to double check that this doesn't result in any issues.
Producers and async consumer don't need to be updated. + The perf connect issue goes away with just the sync consumer fix.
More details: Async consumer open was always calling client ready in a loop (for uamqp as well). As you mentioned, I think this is because it calls client_ready() and asyncio.sleep with await, so it wouldn't be blocking.
Sync and async producers were also always calling client_ready() in a loop.
/azp run python - eventhub - tests
Azure Pipelines successfully started running 1 pipeline(s).
/azp run python - eventhub - tests
Azure Pipelines successfully started running 1 pipeline(s).