C# Class Iot.Ingestion.RouterService.RouterService

This service continuously pulls from IoT Hub and sends events off to tenant applications.
Inheritance: StatefulService
ファイルを表示 Open project: Azure-Samples/service-fabric-dotnet-iot

Public Methods

Method Description
RouterService ( StatefulServiceContext context ) : System

Protected Methods

Method Description
RunAsync ( CancellationToken cancellationToken ) : Task

This is the main entry point for your service replica. This method executes when this replica of your service becomes primary and has write status.

Private Methods

Method Description
ConnectToIoTHubAsync ( string connectionString, long servicePartitionKey, long>.IReliableDictionary epochDictionary, string>.IReliableDictionary offsetDictionary ) : MessagingFactory>>.Task

Creates an EventHubReceiver from the given connection sting and partition key. The Reliable Dictionaries are used to create a receiver from wherever the service last left off, or from the current date/time if it's the first time the service is coming up.

Method Details

RouterService() public method

public RouterService ( StatefulServiceContext context ) : System
context StatefulServiceContext
return System

RunAsync() protected method

This is the main entry point for your service replica. This method executes when this replica of your service becomes primary and has write status.
protected RunAsync ( CancellationToken cancellationToken ) : Task
cancellationToken System.Threading.CancellationToken Canceled when Service Fabric needs to shut down this service replica.
return Task