Loading...

[EventHub] The behavior of EPH SDK behavior of Epoch

[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?

New receiver 111111-11111-1111-11111 with higher epoch of '0' is created hence current receiver 000000-000000-00000-0000-0000000 with epoch '0' is getting disconnected. If you are recreating the receiver, make sure a higher epoch is used.

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.

SungGun_Lee_1-1690874280659.png

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 more
Azure PaaS Blog articles
Azure PaaS Blog articles

Azure PaaS Blog articles

Share post:

Related 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...

1 year ago

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...

1 year ago

[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...

1 year ago

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 ...

1 year ago

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 ...

1 year ago

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...

1 year ago

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...

1 year ago

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...

1 year ago

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...

2 years ago

[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...

2 years ago

Newsletter

Get the latest Dynamics 365 and Power Platform content in your inbox

A curated digest of community blogs, product news, videos, and podcasts — delivered without the noise.

Weekly updates Unsubscribe anytime Fresh community picks
We use your email only for the newsletter and you can unsubscribe at any time.
By subscribing, you agree to the privacy policy.