It seems from the official documentation that they only support sending batch. Just curious to know if something exists (other than sending one as a list of course)
The EventHubProduerClient
does not offer a means to send a single event. During design of the new SDK, we learned that many of the developers using the the single event overload were doing so in scenarios where it had a negative impact on the performance and throughput of their application.
The legacy overload simply performed an implicit new[] { yourEvent }
and called into the IEnumerable<EventData>
overload, causing an allocation and network call for the one event. A fairly large portion of the developers using it let us know that they had assumed there were optimizations within the client to implicitly group events into batch and publish them in an efficient manner.
We removed that overload to reflect the actual behavior and raise developer awareness, hopefully helping to encourage consideration of the best pattern for the scenario.
At some point, we'd like to bring back an optimized version single event publishing, but I can't yet say what form that will take or what the timing may be.