Now in our project, we have a Cloud Service WorkRole, in the work role we create an EventProcessorHost in the Run method to consume data,
publicoverridevoid Run()
{
_host = newEventProcessorHost(
eventHubInfo.HostName,
eventHubInfo.HubName,
eventHubInfo.ConsumerGroupName,
_configurationSetting.ServiceBusConnectionString,
_configurationSetting.StorageConnectionString);
......
}
We send 100 message to the EventHub (message1 ~ message 100), we can get 100 messages by the _host(host1), it works well.
Eg.But when we get message 50, the work role restart for some reason, it will run the Run method, we will get a new host (host2) to consume data, the host2 will get the message1~message 100,
Do we have a way to make the host2 follow host1, it means the host2 will get Message51~message100, if cannot, we know the event hub has the filter function,
do we have a way for the host2 filter to make it only receive Message51~Message100 using the EventProcessorHost ?