[EventHub] The behavior of EPH SDK behavior of Epoch
Are you seeing logs where Epoch ‘0’ is getting disconnected? Does your consumer group consist of numerous consumers but only one partition? If so, this article will help you understand why you are getting such informative logs.
I. What is Epoch?
Epoch is a unique identifier (epoch value) that the service uses, to enforce partition/lease ownership. Thus, epoch features allow one consumer to have exclusive access to a partition despite the competition from other consumers from the same consumer group to use that same partition. This protocol is used from the Event Processor Host (EPH) SDK by using CreateEpochReceiver method. For more information, please visit the following link.
II. Why am I getting disconnected log?
Are you seeing the log as shown below?
That’s because a new consumer is trying to access and connect to the partition where there was already a consumer receiving the events from that partition. Thus, the previous consumer is being disconnected to allow the new consumer to use the partition. As mentioned before, there is competition amongst the consumers.
This log does not mean that there’s an error. Since the partition can only be accessed by one consumer at a time when using Epoch method. Therefore, the partition must release the old consumer to let the new consumer access it. Therefore gradually, you would see a disconnection from the old one to the newest one.
III. Can I not get this logged or any other way to not see this?
The answer to this question is yes and no, depending on your environment. Please be mindful of your environment before using No Epoch method. There is a way to do so, but it comes with a restriction. The way is by using No Epoch method (CreateReceiver method). By using this method, you can create multiple consumers on a single consumer group. However, the concurrent consumers are limited to 5 consumers. Thus, if you are using more than 5 consumers then No Epoch method will not help.
For more information please check this link.
IV. Conclusion
If you are seeing the log message, your consumers are fighting and competing to get access to the partition. However, if no consumers are being added or removed during the process, then there is a problem. If this happens, do not hesitate to contact us for support.
Published on:
Learn moreRelated posts
Azure Storage - TLS 1.0 and 1.1 retirement
Overview TLS 1.0 and 1.1 retirement on Azure Storage was previously announced for Nov 1st, 2024, and it was postponed recently to 1 year later...
Efficient Management of Append and Page Blobs Using Azure Storage Actions
Overview In Azure Storage, Blob Lifecycle Management (BLM) allows you to automate the management of your data based on rules defined by...
[Azure AI Search] Internal Server Error when creating CMK encrypted objects
Scenario Customers follow the Microsoft doc to create CMK encrypted objects (data source, index etc.), but get the 500 Internal Serv...
Optimizing Azure Table Storage: Automated Data Cleanup using a PowerShell script with Azure Automate
Scenario This blog’s aim is to manage Table Storage data efficiently. Imagine you have a large Azure Table Storage that accumulates logs from ...
Optimizing Azure Table Storage: Automated Data Clean-up using a PowerShell script with Azure Automat
Scenario This blog’s aim is to manage Table Storage data efficiently. Imagine you have a large Azure Table Storage that accumulates logs from ...
Restoring Soft-Deleted Blobs with multithreading in Azure Storage Using C#
Blob soft delete is an essential feature that safeguards your data against accidental deletions or overwrites. By retaining deleted data for a...
Performing simple Azure Table Storage REST API operations using curl command.
The blog provides guidance to perform simple Table Storage REST API operations such as Create table, Delete Table, Insert entity, Delete entit...
Bulk delete all the old jobs from the batch account
Deleting a Job also deletes all Tasks that are part of that Job, and all Job statistics. This also overrides the retention period for Task dat...
Utilizing Azure Storage and Runbooks for scheduled automated backups of Azure SQL Databases
In this article, we are going to provide detailed steps to create a scheduled Azure SQL Database backup to storage account using automation. T...
[Azure Service Bus] JMS messages getting dead-lettered
The article discusses a problem where numerous messages end up in the dead letter queue (DLQ) when the JMS service bus consumer connects to th...