Azure / Azure/iot-operations-sdks

[Improvement][.NET] Cache state store client in base connector

Open
#1,312 0 comments 0 reactions 1 assignee Claimed by @timtay-microsoft View on GitHub
Dominant language
C#
Stars
20
Forks
27
Avg merge
2d 1h
Merged PRs (30d)
33

Description

### Product

.NET SDK

### Azure Iot Operations version

N/A

### What happened?

In the connector worker class, when an asset attempts to forward a dataset with a destination of the state store, it creates and then disposes the state store client. We should probably just create this client once and cache it for later requests.

https://github.com/Azure/iot-operations-sdks/blob/f689997cdbc30320697cd1762e5c23f0d2e65a76/dotnet/src/Azure.Iot.Operations.Connector/ConnectorWorker.cs#L409

### List the steps to reproduce

_No response_

### Code of Conduct

- [x] I agree to follow this project's Code of Conduct

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.