azureservicebus

What is causing Azure Event Hubs ReceiverDisconnectedException/LeaseLostException?

走远了吗. 提交于 2019-11-27 19:06:11
I'm receiving events from an EventHub using EventProcessorHost and an IEventProcessor class (call it: MyEventProcessor). I scale this out to two servers by running my EPH on both servers, and having them connect to the Hub using the same ConsumerGroup, but unique hostName's (using the machine name). The problem is: at random hours of the day/night, the app logs this: Exception information: Exception type: ReceiverDisconnectedException Exception message: New receiver with higher epoch of '186' is created hence current receiver with epoch '186' is getting disconnected. If you are recreating the

Azure Service Bus - Receive Messages with OnMessage() Method

落爺英雄遲暮 提交于 2019-11-27 18:44:12
问题 Following the MS documentation it was not difficult to receive message(s) from subscription. However, if I'd like my application to receive a message every time new message is posted - a constant polling. Hence the OnMessage() method of the SubscriptionClient class. MS documentation says: " ...When calling OnMessage, the client starts an internal message pump that constantly polls the queue or subscription. This message pump consists of an infinite loop that issues a Receive() call. If the

understanding check pointing in eventhub

本秂侑毒 提交于 2019-11-27 13:07:43
问题 I want to ensure that, if my eventhub client crashes (currently a console application), it only picks up events it has not yet taken from the eventhub. One way to achieve this, is to exploit offsets. However, this (to my understanding) requires the client to store the latest offset (besides events do not necessarily seem to hit the foreach loop of the ProcessEventsAsync method ordered by SequenceNumber). An alternative, is to use checkpoints. I think they are persisted via the server