Redeliver unprocessed EventHub messages in IEventP

2019-09-01 12:36发布

In IEventProcessor.ProcessEventsAsync I want to store events in a persisted store. It's possible this store is unavailable and messages cannot be persisted. How to sign these messages to be redelivered later?

The store may be down only for some hours, but until it's up again every message is affected and cannot be persisted.

2条回答
Deceive 欺骗
2楼-- · 2019-09-01 13:17

Adding to Tyler response, i suppose that you could use the some kind of "Poison Message"/Dead letter queue approaches. Event Hub does not have that functionality, but Service Bus Queues do.

Anyway, i think that it should be a programmatic approach, not something inside of the backend. There is a good article about something else, but approach is alike what i meant: https://www.dougv.com/2015/07/handling-poison-messages-in-an-azure-service-bus-queue/

查看更多
我只想做你的唯一
3楼-- · 2019-09-01 13:28

I don't think you can mark a particular event to be delivered in eventhub, unlike ServiceBus queue. However, eventhub does provide retention policy and offset for each event, which make possible to reprocess an old event. You can read more in the "checkpointing" section from this document: https://azure.microsoft.com/en-us/documentation/articles/event-hubs-overview/

查看更多
登录 后发表回答