Closed willin closed 7 years ago
This is not a feature we have implemented yet and it's unlikely we will get to it soon.
Right now all messages from a specific device always end up on the same partition so there is some predictability though, so I don't know about your scenario but that might help?
Here's the hash function to know which partition is going to be used based on the device id:
Feel free to add more context or let us know if that'll work for you.
how about event-hubs createSender? @pierreca
https://github.com/Azure/azure-event-hubs-node/blob/master/send_receive/lib/sender.js#L50
// to partition no.1, will this work?
message.properties.add('x-opt-partition-key', 'pk:1');
means this won't work?
Adding x-opt-partition-key
to a message sent to IoT Hub will not work.
Is there any other way to route messages to a specific partition?
In python, can we check to which partition device to cloud message is going?
it seems make the perf test become more complex. and if send batch to iothub, does this can control random for different partition or same partition to process?
Context
Description of the issue:
how to send messages to specific partition
Code sample exhibiting the issue:
C#: https://docs.microsoft.com/en-us/dotnet/api/microsoft.servicebus.messaging.eventhubclient.createpartitionedsender?view=azureservicebus-4.1.1
https://github.com/Azure/azure-iot-sdk-node/blob/master/device/samples/simple_sample_device.js#L45