I have an Azure function app that processes data from an EventHub. My current CI/CD process uses deployment slots to deploy:
- Deploy function to staging slot
- Validate staging slot with a smoke test
- Swap staging with production
The CI/CD flow itself is working without issue. However, during the time my staging slot is active, I'm essentially double-processing messages off the EventHub as there are two active function apps.
What is the best practice way to handle CI/CD for integration apps like this? Is there a way to pin events to a certain slot with EventHub in the function binding? Perhaps it's unavoidable and doubling-down on idempotentency is the solution?