There are some cases that this code does not handle:
Event Hubs with more than 32 partitions.
Event Hubs with partitions that are not integers between 0-31. ie. The implementation should not assume they can be parsed into an integer nor reason about the relationship between them.
All of the code around partitions being INTs and being limited to 32 is simply so the checkpoint offsets could use an array and Interlocked. This could be easily changed.
There are some cases that this code does not handle: