Skip to content

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

@timtay-microsoft

Description

@timtay-microsoft

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.

await using StateStoreClient stateStoreClient = new(_applicationContext, _mqttClient);

List the steps to reproduce

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Labels

triageTriage required

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions