'Enqueueing a message to Azure Storage in an Azure function without changing the output

I have a custom handler written in Go running as an Azure Function. It has an endpoint with two methods:

  • POST /entities
  • PUT /entities

It was easy to make my application run as an Azure function: I added "enableForwardingHttpRequest": true to host.json, and it just works.

What I need to achieve: life happened and now I need to enqueue a message when my entities change, so it will trigger another function that uses a queueTrigger to perform some async stuff.

What I tried: The only way I found so far was to disable enableForwardingHttpRequest, and change all my endpoints to accept the Azure Function's raw JSON input and output, and then output a message in one of the fields (as documented here.

It sounds like a huge change to perform something simple... Is there a way I can enqueue a message without having to change all the way my application handles requests?



Solution 1:[1]

As per this Github document as of now custom handlers related to go lang in Azure functions having a bug and which need to be fixed. enter image description here

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 SaiSakethGuduru-MT