Azure / Azure/azure-iot-sdk-python

[Technical Question] IoTHubModuleClient method send_message takes lot of time

Đang mở
#1,155 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
IoTSDK question
Ngôn ngữ chính
Python
Star
438
Fork
380
Merge trung bình
22 giờ 17 phút
Pull request đã merge (30 ngày)
22

Mô tả

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)

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Không có tệp nào trong repository hoặc test nào được nêu tên; hãy bắt đầu từ entry point async IoTHubModuleClient.send_message và so sánh timing xung quanh await. Một hướng giải quyết hữu ích sẽ xác định liệu ~300 ms được báo cáo có phải là mức ожида đợi hay không, hoặc xác định một thay đổi có thể tái hiện giúp giảm thời gian đó.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
azure, python
Lĩnh vực
embedded-iot, networking
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Cần làm rõ
Mức phù hợp với người mới
20/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.