public static async Task <EventHubPartitionCheckpoint> Create(ICheckpointSettings settings, string streamProviderName, string partition) { var checkpoint = new EventHubPartitionCheckpoint(settings, streamProviderName, partition); await checkpoint.Initialize(); return(checkpoint); }
public async Task Initialize(TimeSpan timeout) { var dataAdapter = new EventHubDataAdapter(bufferPool); cache = new PooledQueueCache <EventData, CachedEventHubMessage>(dataAdapter) { OnPurged = OnPurged }; dataAdapter.PurgeAction = cache.Purge; checkpoint = await EventHubPartitionCheckpoint.Create(config.CheckpointSettings, config.StreamProviderName, config.Partition); string offset = await checkpoint.Load(); receiver = await CreateReceiver(config, offset); }
public static async Task<EventHubPartitionCheckpoint> Create(ICheckpointSettings settings, string streamProviderName, string partition) { var checkpoint = new EventHubPartitionCheckpoint(settings, streamProviderName, partition); await checkpoint.Initialize(); return checkpoint; }