0

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.

Attila Cseh
  • 235
  • 2
  • 13
  • can you add more information on - how much tolerance is needed for the underlying persisted store's downtime - 5 mins - 1 hr - 1 day? & If the underlying persisted store is down - will you be able to proceed with rest of the messages? coz, won't other messages also hit the exact same problem, as their store is down - so why redeliver instead of waiting until the underlying store is available? pls. explain. – Sreeram Garlapati Apr 13 '16 at 19:00
  • I don't think I can stop processing messages and start waiting for the store to be up again using some kind of retry policy in ProcessEventsAsync. The lease may expiry meanwhile. Do you mean invoking UnregisterEventProcessorAsync then waiting for some time? – Attila Cseh Apr 14 '16 at 11:33
  • This is an implementation detail - one solution I can think of is - you can checkpoint the same old eventData - which will keep the lease and not move the cursor forward.

    my question is what is the scenario you are trying to address - a) an intermittent down stream processing issue (or) b) message specific processing failures (poison message). If it is down stream processing - which is common for all of your messages - you need to stop processing until its back up. If it is a poison message - you will either need to push to a different EventHub to process later - or re-send to current EHub.

    – Sreeram Garlapati Apr 14 '16 at 19:02
  • your question seemed to be solving a) - but your solution was to redeliver - while the messages are already with you in memory. All you need to do is to TryWriteToPerisistentStore - if this fails - fake the checkpoint with OldCheckpointedEventData – Sreeram Garlapati Apr 14 '16 at 19:13

2 Answers2

0

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/

0

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/

Alex Belotserkovskiy
  • 4,012
  • 1
  • 13
  • 10