I\'m trying to send messages to Azure Event Hub using python and the rest API after some failed experiments i have found working code (see below) but i want to be able to se
Following the section 'Send Event' of Event Hubs REST APIs docunment https://msdn.microsoft.com/en-us/library/azure/dn790664.aspx, you can't use the Request URI https://{serviceNamespace}.servicebus.windows.net/{eventHubPath}/messages to select to which partition to send events.
You should use the Request URI https://{serviceNamespace}.servicebus.windows.net/{eventHubPath}/publishers/{deviceId}/messages. The attribute {deviceId} is partition key what used to group/partition devices—whether it is geo-location, device type, version, tenant, and so on.
But the partition count must be a number between 2 and 32. So if you need to use more than 32 partitions, I suggest to put the key into the event data.
Best Regards.