We are having a strange issue with the change feed subscriber isnt picking up new records after the cosmos db is redeployed in a different service. My assumption was when the feed is down it would then pick up from where it left off once the container becomes available again?
Was curious to know if anyone else has seen this behaviour before or if its potentially something to do with the configuration of the feed?
To add a bit of context manually deleting and recreating the containers seems to fix the issue so it seems deployment-related?
This is what our change feed configuration looks like.
var changeFeedProcessorBuilder = (await _cosmosProvider
.GetContainer(_config.DatabaseName, _config.SourceContainerName))
.GetChangeFeedProcessorBuilder<CosmosAggregateEventEntity>(_projector.Name, OnMessage)
.WithInstanceName($"Processor{Guid.NewGuid().ToString().Replace("-", string.Empty)}")
.WithLeaseContainer(await _cosmosProvider.GetContainer(_config.DatabaseName, CosmosChangeFeedConfiguration.LeaseContainerName, "/id"))
.WithStartTime(DateTime.MinValue.ToUniversalTime());
if (_defaultPollingTimeOverride != null)
changeFeedProcessorBuilder.WithPollInterval((TimeSpan)_defaultPollingTimeOverride);
_processor = changeFeedProcessorBuilder.Build();
await _processor.StartAsync();