We pass batch=self._prefetch in to ReceiveClient.do_work when receiving in the SDK.
|
self._handler.do_work(batch=self._prefetch) # type: ignore |
However, we know that this prefetch has already been passed in during ReceiveClient instantiation and set to _link_credit in that client.
|
link_credit=self._prefetch, |
So, passing in the prefetch is unnecessary in the SDK when calling do_work. We can just pass in batch=self._link_credit to the self._connection.listen here:
|
self._connection.listen(wait=self._socket_timeout, **kwargs) |
. This will help us further unify the pyamqp/uamqp logic in the SDKs.
We pass
batch=self._prefetchin toReceiveClient.do_workwhen receiving in the SDK.azure-sdk-for-python/sdk/eventhub/azure-eventhub/azure/eventhub/_consumer.py
Line 231 in 1ad3a2c
However, we know that this prefetch has already been passed in during ReceiveClient instantiation and set to _link_credit in that client.
azure-sdk-for-python/sdk/eventhub/azure-eventhub/azure/eventhub/_consumer.py
Line 169 in 1ad3a2c
So, passing in the prefetch is unnecessary in the SDK when calling do_work. We can just pass in
batch=self._link_creditto theself._connection.listenhere:azure-sdk-for-python/sdk/eventhub/azure-eventhub/azure/eventhub/_pyamqp/client.py
Line 661 in 1ad3a2c