title: What happens to the messages being processed on functions running when we disable the function?
body: <p>We are working with Azure functions, which are triggered on every message in the service bus queue. We are trying to solve a problem whereby we need to disable a function on the function app processing messages, dynamically, so that it does not process messages any further and we do not lose any message in the process as well.</p>
  <p>We can disable the functions via multiple ways, referring to <a href="https://docs.microsoft.com/en-us/azure/azure-functions/disable-function" rel="nofollow noreferrer">link</a> but the problem remains the same. <strong>Unable to figure out what happens to the functions already spawned when trying to disable the same</strong>.</p>
  <p>Since the function is service bus triggered there is always a possibility that the function is processing a message and we disable the same, does it get processed, any sorts of cancellation is raised, it just dies out with an exception?</p>
  <p>It would be great someone could direct me to some documentation or something. Thanks.</p>