Implementing reliable messaging in distributed systems can be challenging. This article describes how to use the Transactional Outbox pattern for reliable messaging and guaranteed delivery of events, an important part of supporting idempotent message processing. To accomplish this, you'll use Azure Cosmos DB transactional batches and change feed in combination with Azure Service Bus.
https://learn.microsoft.com/en-us/azure/architecture/databases/guide/transactional-outbox-cosmos