Fix sample by truncating iot hub name to 25 chars#18521
Fix sample by truncating iot hub name to 25 chars#18521mtin wants to merge 1 commit intoAzure:masterfrom
Conversation
|
Thank you for your contribution mtin! We will review the pull request and get back to you soon. |
|
/azp run python - eventhub - tests |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
@rakshith91 I believe this sample is in the list of ignored samples, so it should automatically pass the tests. To check that this works, we may need to remove the sample from the ignored samples list and add necessary env vars to the template. |
|
Hey @mtin, just wanted to give you an update! We're working on testing this sample and testing your fix right now. Thanks for your contribution! |
|
Hey @mtin! After discussing this with the team, we decided not to merge this PR for the following reasons:
However, we really appreciate you calling attention to this bug! We're hoping to have a response from the service team within the next month and have created an issue to track this. Closing this PR. Thanks again! |
I had trouble running the event hub sample for retrieving messages from the built-in endpoint of an IoT hub. An earlier version of the sdk had integrated support to create a receiver from an iot hub connection string (
EventHubClient.from_iothub_connection_string()) but it seems like that has been removed?The sample
sdk/eventhub/azure-eventhub/samples/async_samples/iot_hub_connection_string_receive_async.pyhas methods to generate an event hub connection string from an iot hub connection string - but apparently there is a bug.The
EntityPathpart of the connection string has to be truncated to 25 characters, otherwise the sample fails with the following messages:I validated the 25 char limit by manually retrieving the event hub compatible connection string from the iot hub page of the azure portal