Processing within one partition
Similar to the previous example, where we learned how to process across partitions, we can use the EventHubConsumerClient
 class to process data within single partitions, too. All we have to do is specify the partition ID in the client.receive
call, as demonstrated in the following code snippet. The rest of the code will remain the same as the previous example:
With client: Â Â Â Â client.receive( Â Â Â Â Â Â Â Â on_event=on_event, Â Â Â Â Â Â Â Â partition_id='0', # To read only partition 0 Â Â Â Â )
This is how we can programmatically process the data from specific Event Hubs partitions.
Next, let's look at how to scale resources for stream processing.