Azure / Azure/azure-iot-sdk-python
[Technical Question] IoTHubModuleClient method send_message takes lot of time
- Dominant language
- Python
- Stars
- 438
- Forks
- 380
- Avg merge
- 22h 17m
- Merged PRs (30d)
- 22
Description
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 ?

Contributor guide
Research direction
No repository file or test is named; begin at the async IoTHubModuleClient.send_message entry point and compare timing around the await. A useful resolution would establish whether the reported ~300 ms is expected or identify a reproducible change that reduces it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, python
- Domain
- embedded-iot, networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100