I am using EventProcessorHost for reading Eventhub data and i got following error.
New receiver with higher epoch of '798393595' is created hence current receiver with epoch '17' is getting disconnected. If you are recreating the receiver, make sure a higher epoch is used. TrackingId:6368f7fc0004165d0001c7bb58238501_G34_B22, SystemTracker:dynmsg-push-evidence:eventhub:push-assignment-execute~28671|dsreporting, Timestamp:11/9/2016 8:21:32 PM
Note - I am not using EventHubReciever and used only EventProcessorHost way to read data from event hub. I can see first time it will run and read data from event hub but after that it will always throw error like above?
I there anyway we can avoid Epoch value to read data? Assuming i only want to achieve this using EventProcessorHost.
eventProcessorHost = new EventProcessorHost(eventProcessorHostName,config.EventHubSourceName, string.IsNullOrEmpty(config.EventHubSourceConsumerGroup)? EventHubConsumerGroup.DefaultGroupName:config.EventHubSourceConsumerGroup,
config.EventHubSourceConnectionString, config.StorageConnectionString)
{
PartitionManagerOptions = new PartitionManagerOptions()
{
AcquireInterval = TimeSpan.FromSeconds(10),
RenewInterval = TimeSpan.FromSeconds(10),
LeaseInterval = TimeSpan.FromSeconds(30)
}
};
var eventProcessOption = new EventProcessorOptions
{
InvokeProcessorAfterReceiveTimeout = true,
MaxBatchSize = 100,
PrefetchCount = 100,
ReceiveTimeOut = TimeSpan.FromSeconds(30)
};
eventProcessOption.ExceptionReceived += EventProcessOption_ExceptionReceived;
var factory = new EventHubHostFactory(config.FileName, CallbackEventHubData);
// var eventFactory = new DefaultEventProcessorFactory<factory>();
await eventProcessorHost.RegisterEventProcessorFactoryAsync(factory, eventProcessOption);