I am using Azure Event Hubs in a C# Winforms project.
I create EventProcessorHost and EventReciever objects to carry out the work of retrieving messages from the event hub and displaying them.
Part of my message retrieval process involves creating a new consumer group on my Event Hub when my form is opened. (I just make the consumer group name a new GUID).
All of this^ works.
When the form is closed, the consumer group is deleted from the Event Hub, and this is validated by viewing the Event Hub through the portal.
However, the partition objects used by the consumer groups to do the Event Hub work still exist in the Storage Account.
When going through CloudBerry explorer, I see this:
Where each GUID is a consumer group. There are hundreds here over the last few months of my development, but an Event Hub only can contain 20 active consumer groups at a time.
Inside each consumer group folder is 4 files with information pertaining to each of the 4 partitions used by that consumer group.
Is there an API call on an Event Hub object (EventReceiver, EventProcessorHost, etc.) that can clean these up for me in an automated way? I have looked but have not found anything and documentation on Event Hubs is currently minimal.
I looked at EventProcessorHost.PartitionManagerOptions.SkipBlobContainerCreation = true but this did not help.
If not, is there a setting on the storage account that needs to be set to avoid this buildup of junk?
Thanks!