I am trying to migrate code that used the old EventHubSender from the Microsoft.ServiceBus (.Net Framework) to the new PartitionSender in the Microsoft.Azure.EventHubs package. In the old package I could run OnClosed on the sender and recreate it if needed. However, I can't find any way to do it here.
I have a "sender pool" that I am maintaining so I want to make sure that no one closed the sender before I pass it to some other call.
Any direction in this matter will be greatly appreciated, thanks!
FYI, Current version Microsoft.Azure.EventHubs 4.0.0
does not have this feature, but EventHub team is working on this, and will be released in the future version.
Click here to see the progress.
Hope it helps.