-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Closed
Labels
ClientThis issue points to a problem in the data-plane of the library.This issue points to a problem in the data-plane of the library.Event HubsP0customer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that
Milestone
Description
- Package Name: azure-eventhub
- Package Version: 5.2.0
- Operating System: Ubuntu 20.04
- Python Version: 3.8
Describe the bug
Object EventData is not pickeable, thus it is not possible to process them in a process pool.
To Reproduce
Steps to reproduce the behavior:
from multiprocessing import Pool
from typing import List
from azure.eventhub import EventData
def build_event_data(i):
return EventData(body=f'{i}')
if __name__ == "__main__":
with Pool() as p:
eventdata : List[EventData] = p.map(build_event_data,[(i) for i in range(10)])
Expected behavior
It's expected that eventdata holds a list of all events created in parallel.
Exception Raised
multiprocessing.pool.MaybeEncodingError: Error sending result: '[EventData(body='0', properties={}, offset=None, sequence_number=None, partition_key=None, enqueued_time=None)]'. Reason: 'TypeError('no default __reduce__ due to non-trivial __cinit__')'
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
ClientThis issue points to a problem in the data-plane of the library.This issue points to a problem in the data-plane of the library.Event HubsP0customer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that