-
Notifications
You must be signed in to change notification settings - Fork 2
Description
When publishing events via InMemoryEventHubProducerClient, the size of event/batch is not checked in a realistic manner. Currently, there is only a dummy behaviour that checks that EventDataBatch does not contain more than 64 items.
Instead of this dummy count-based behaviour, the library should test the size of the events/batches as the real Event Hub service does. Doing this precisely is not easy because it would require to execute the real AMQP serialization so some approximation based on event payload size + properties size would be enough for now.
The testing of the event/batch size should be done in all relevant methods such as SendAsync(IEnumerable<EventData> eventBatch), SendAsync(EventDataBatch eventBatch) or EventDataBatch.TryAdd methods.
To size limits different for each event hub tier. Therefore, the library should also allow to specify the event hub namespace tier upon creation.