Azure / Azure/azure-iot-sdk-python

[Technical Question] IoTHubModuleClient method send_message takes lot of time

オープン
#1,155 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
IoTSDK question
主要言語
Python
スター
438
フォーク
380
平均マージ
22時間 17分
マージ済み PR(30日)
22

説明

Hi Team,

I am trying to use send_message method of the async IoTHubModuleClient class
```

# The client object is used to interact with your Azure IoT hub.
module_client = IoTHubModuleClient.create_from_edge_environment()

# Connect the client.
await module_client.connect()

async def send_test_message(i):
print("sending message #" + str(i))
msg = Message("test wind speed " + str(i))
msg.message_id = uuid.uuid4()
msg.correlation_id = "correlation-1234"
msg.custom_properties["tornado-warning"] = "yes"
await module_client.send_message(msg)
print("done sending message #" + str(i))
```

i tried measuring the time taken for **send_message** and it is around 300 milliseconds. Is there a way to reduce this time ?
![image](https://github.com/Azure/azure-iot-sdk-python/assets/10043245/424c851e-c3a1-49f8-9c26-fe5aaa9f0bf6)

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

リポジトリのファイルやテストは指定されていません。async IoTHubModuleClient.send_message のエントリーポイントから始め、await の前後のタイミングを比較してください。報告された ~300 ms が想定どおりかどうかを明らかにするか、それを短縮する再現可能な変更を特定できれば、有用な解決になります。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
azure, python
領域
embedded-iot, networking
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
20/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。