The code change is introduced in Util.cs which is related to creating chunks of messages before sending those to event hub. The Azure event hub has a message size of 256KB in the basic tier and the logic in Util.cs would create messages beyond this 256KB limit for event hub, resulting in exceptions. The fix assumes a message size (in bytes) and then fills ups the List with objects enough to be below the threshold of 256KB and resets the collection before the next pass.
I have added comments in the Util.cs file.
The code change is introduced in Util.cs which is related to creating chunks of messages before sending those to event hub. The Azure event hub has a message size of 256KB in the basic tier and the logic in Util.cs would create messages beyond this 256KB limit for event hub, resulting in exceptions. The fix assumes a message size (in bytes) and then fills ups the List with objects enough to be below the threshold of 256KB and resets the collection before the next pass. I have added comments in the Util.cs file.