It was pointed out in PR "Event hub stream provider EventData to cached data mapping" #1727 that the encoding from EventHub's event data to the cached data and back to an EventHubMessage is not as efficient as it could be.
Some possible optimizations:
- Fields like partition key, sequence number, and enqueue time, are duplicated as they are both properties and data in the property bag.
- Property bag is serialized as a dictionary which is not very efficient, when it could be serialized as a simple enumerable.
- Property bag is deserialized even if not used.
- All properties in property bag are encoded when applications may not need all of them.
It was pointed out in PR "Event hub stream provider EventData to cached data mapping" #1727 that the encoding from EventHub's event data to the cached data and back to an EventHubMessage is not as efficient as it could be.
Some possible optimizations: