You host a Function App on the Premium plan and must perform zero-downtime deployments. You already created a staging slot and plan to swap after validation. During validation in staging, no production Event Hub or Service Bus messages must be consumed. Which two configurations should you implement?
Choose an answer
Tap an option to check your answer.
Correct answer: Mark event source connection strings and other secrets as slot settings and point the staging slot to non-production resources., Add AzureWebJobs.`<FunctionName>`.Disabled = true as a slot setting in the staging slot so triggers are disabled there but remain enabled in production..
Why this is the answer
To ensure zero-downtime deployments and prevent the staging slot from consuming production messages, you must isolate its configuration. Marking event source connection strings and other secrets as slot settings (sticky settings) allows them to be configured differently for each slot. You can then point the staging slot to non-production Event Hubs or Service Bus instances, preventing it from interacting with production data. Additionally, setting AzureWebJobs.<FunctionName.Disabled = true as a slot setting in the staging slot will disable specific function triggers there, ensuring they don't process messages during validation, while remaining active in production. "Swap with preview" is for warming up, not preventing message consumption. Stopping the production slot causes downtime. Disabling Run-From-Package is generally not recommended for performance and deployment reasons.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed