title: How to reliably store event to Azure CosmosDB and dispatch to Event Grid exactly once
body: <p>I'm experimenting with event sourcing / cqrs pattern using serverless architecture in Azure.</p>
  
  <p>I've chosen Cosmos DB document database for Event Store and Azure Event Grid for dispachting events to denormalizers.</p>
  
  <p>How do I achieve that events are reliably delivered to Event Grid exactly once, when the event is stored in Cosmos DB? I mean, if delivery to Event Grid fails, it shouldn't be stored in the Event Store, should it?</p>