Search code examples
pythonazureazure-eventhub

Memory size exceeded while sending data in Azure Eventhub using python code


ValueError: EventDataBatch has reached its size limit: 1048576

I am using below code enter image description here


Solution

  • Use the add method to add events until the maximum batch size limit in bytes has been reached - at which point a ValueError will be raised.

    As per the above statement from official document, the events you have added in batch has exceeded the maximum size limit which is 1 MB.

    enter image description here

    Make sure that the batch must contain the events' size upto 1MB only.