Redeliver unprocessed EventHub messages in IEventProcessor.ProcessEventsAsync

寵の児 提交于 2019-12-12 01:56:31

问题


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.


回答1:


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/




回答2:


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/



来源:https://stackoverflow.com/questions/36475881/redeliver-unprocessed-eventhub-messages-in-ieventprocessor-processeventsasync

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!