[EventHubs] Eventhubs aio changes#8331
[EventHubs] Eventhubs aio changes#8331lmazuel merged 19 commits intoAzure:feature/eventhubs_preview5from
Conversation
|
Can one of the admins verify this patch? |
|
|
||
|
|
||
| def get_connection_manager(**kwargs): | ||
| connection_mode = kwargs.get("connection_mode", _ConnectionMode.SeparateConnection) |
There was a problem hiding this comment.
The **kwargs passed in here comes from the constructor of the EventHubClient. How is the caller supposed to pass in a valid value here given that the type is internal?
There was a problem hiding this comment.
We get either users' input, for instance, http_proxy, or the default value of uamqp if it's not in users' input
There was a problem hiding this comment.
What does the user's code look like if they want to use websockets?
There was a problem hiding this comment.
EventHubConsumerClient(..., transport_type = TransportType.WebSocket)There was a problem hiding this comment.
Not blocking for preview5, solving
There was a problem hiding this comment.
Sorry. Meant to ask about connection_mode, not transport.
There was a problem hiding this comment.
(not blocking the release, but I would still like to get an answer :))
There was a problem hiding this comment.
connection_mode is not for external users. So our documentation doesn't mention it. We use it.
There was a problem hiding this comment.
...so we smuggle a **kwarg between internal parts of our code? The signature of get_connection_manager is suspect to say the least. Why not take a single connection_mode optional positional parameter with a default value? As it is now, the code is not very maintainable.
sdk/eventhub/azure-eventhubs/azure/eventhub/aio/_consumer_client_async.py
Outdated
Show resolved
Hide resolved
sdk/eventhub/azure-eventhubs/azure/eventhub/aio/_consumer_client_async.py
Outdated
Show resolved
Hide resolved
sdk/eventhub/azure-eventhubs/azure/eventhub/aio/_consumer_client_async.py
Outdated
Show resolved
Hide resolved
sdk/eventhub/azure-eventhubs/azure/eventhub/aio/_consumer_client_async.py
Show resolved
Hide resolved
sdk/eventhub/azure-eventhubs/azure/eventhub/aio/_consumer_client_async.py
Show resolved
Hide resolved
sdk/eventhub/azure-eventhubs/azure/eventhub/aio/_producer_client_async.py
Show resolved
Hide resolved
sdk/eventhub/azure-eventhubs/azure/eventhub/aio/_producer_client_async.py
Show resolved
Hide resolved
sdk/eventhub/azure-eventhubs/azure/eventhub/aio/eventprocessor/__init__.py
Show resolved
Hide resolved
sdk/eventhub/azure-eventhubs/azure/eventhub/aio/eventprocessor/_ownership_manager.py
Show resolved
Hide resolved
sdk/eventhub/azure-eventhubs/azure/eventhub/aio/eventprocessor/partition_manager.py
Outdated
Show resolved
Hide resolved
sdk/eventhub/azure-eventhubs/azure/eventhub/aio/eventprocessor/event_processor.py
Show resolved
Hide resolved
sdk/eventhub/azure-eventhubs/azure/eventhub/aio/eventprocessor/event_processor.py
Outdated
Show resolved
Hide resolved
sdk/eventhub/azure-eventhubs/azure/eventhub/aio/_producer_client_async.py
Show resolved
Hide resolved
sdk/eventhub/azure-eventhubs/azure/eventhub/aio/_producer_client_async.py
Show resolved
Hide resolved
sdk/eventhub/azure-eventhubs/azure/eventhub/aio/_consumer_client_async.py
Show resolved
Hide resolved
sdk/eventhub/azure-eventhubs/azure/eventhub/aio/_consumer_client_async.py
Show resolved
Hide resolved
sdk/eventhub/azure-eventhubs/azure/eventhub/aio/_consumer_client_async.py
Show resolved
Hide resolved
sdk/eventhub/azure-eventhubs/azure/eventhub/aio/_consumer_client_async.py
Show resolved
Hide resolved
sdk/eventhub/azure-eventhubs/azure/eventhub/aio/_consumer_client_async.py
Outdated
Show resolved
Hide resolved
sdk/eventhub/azure-eventhubs/azure/eventhub/aio/_consumer_client_async.py
Outdated
Show resolved
Hide resolved
sdk/eventhub/azure-eventhubs/azure/eventhub/aio/_consumer_client_async.py
Outdated
Show resolved
Hide resolved
sdk/eventhub/azure-eventhubs/azure/eventhub/aio/_producer_client_async.py
Outdated
Show resolved
Hide resolved
sdk/eventhub/azure-eventhubs/azure/eventhub/aio/_consumer_client_async.py
Show resolved
Hide resolved
sdk/eventhub/azure-eventhubs/azure/eventhub/aio/_consumer_client_async.py
Outdated
Show resolved
Hide resolved
sdk/eventhub/azure-eventhubs/azure/eventhub/aio/_consumer_client_async.py
Outdated
Show resolved
Hide resolved
sdk/eventhub/azure-eventhubs/azure/eventhub/aio/_consumer_client_async.py
Show resolved
Hide resolved
sdk/eventhub/azure-eventhubs/azure/eventhub/aio/_producer_client_async.py
Outdated
Show resolved
Hide resolved
sdk/eventhub/azure-eventhubs/azure/eventhub/aio/_producer_client_async.py
Outdated
Show resolved
Hide resolved
sdk/eventhub/azure-eventhubs/azure/eventhub/aio/eventprocessor/_ownership_manager.py
Show resolved
Hide resolved
sdk/eventhub/azure-eventhubs/azure/eventhub/aio/eventprocessor/_ownership_manager.py
Show resolved
Hide resolved
sdk/eventhub/azure-eventhubs/azure/eventhub/aio/eventprocessor/event_processor.py
Show resolved
Hide resolved
sdk/eventhub/azure-eventhubs/azure/eventhub/aio/eventprocessor/event_processor.py
Show resolved
Hide resolved
sdk/eventhub/azure-eventhubs/azure/eventhub/aio/eventprocessor/partition_context.py
Show resolved
Hide resolved
* [EventHubs] Eventhubs Sync Changes (#8336) * Sync EventHub API for review * 2.7 compatible * new api tests * Update sync version implemention and tests * Making CI happy * remove async file and add README CHANGELOG * Update common files in eventprocessor * Adding checkpointstoreblob * Update unittest and share_requirement * Update shared_requirements.txt * Update setup.py for CI to pass * Update storage dependency * Update according to comment * [EventHubs] Eventhubs aio changes (#8331) * Eventhubs AIO changes * Add new files * Add new files * Add test code for review * Changes for code review * Make it testable * Update conftest for backward compatibility * add init to _eventprocessor * Remove obsolete async test example * Remove sample partition manager * update blobstorageaio * Put close reason and ownership error to common * Add blobstorage stuffs * fix pylint * Fix shared_requirement * Change blob storage dependency to >=12.0.0 * small doc change * Doc for eventhub * More doc improvement * Fix doc folder detection * Doc improvement * [EventHubs] Updating samples, small update in readme (#8383) * Updating samples, small update in readme * Small update on blob storage sample * Update readme to fix analyze check * remove timeout and retry in sample * fix pylint and update rst * remove timeout and retry in sample * Remove CloseReason from aio init * Update docstring * Hide static keys of EventData * Update from connection string and test.yml (#8392) * update env name in yml * update from connection string * small fix * Update docstring * Fix a test file problem after merge async/sync * Docstring, sample, readme update (#8395) * update env name in yml * update from connection string * small fix * Update manifest files, samples, code snippet * Fix in docstring * update readme * Small fix * remove unused import * sync and async sample balance load * Changelog, sample, test updates (#8411) * doc feedback update * update on changelog and samples * small fix in samples * Revert "Fix doc folder detection" This reverts commit b3c601f.
This PR only has the async code chagne under azure.eventhub.aio.
To avoid too many files to review, I created this PR that only has the core code.
To make it testable, I changed some sync files, mainly change EventHubClient.create_consumer to ._create_consumer and create_producer to _create_producer. You can skip fast for these changes.