azuretcpazure-functionsazure-logic-apps

How can I receive TCP messages using Azure Functions or Logic Apps?


I'm looking to receive TCP messages using Azure Functions or Logic Apps. I understand that both services are typically triggered by HTTP requests, but I'm wondering if there's a way to run a TCP receiver app within an Azure Function to accept TCP messages. Additionally, I haven't found any networking settings in Azure Functions that allow TCP traffic. Is there a workaround or a configuration option to enable TCP support in Azure Functions or Logic Apps?

I tried using an Azure Function with an HTTP trigger, hoping to find a way to bind it to TCP instead. I expected to configure the function to listen for TCP messages, but couldn't find any settings or options for enabling TCP support. Instead, the function remained limited to HTTP requests, and I didn't receive any TCP messages.


Solution

  • I understand that you want to receive HL7 messages. HL7 messages generally use MLLP protocol which is built on top of TCP/IP.

    Azure functions don't support TCP triggers. You may want to use Azure Relay which supports hybrid connections(HTTP and TCP) to listen for incoming HL7 messages and use Azure functions to process the HL7 messages.

    You can also containerize your application using an Azure container instance to listen for HL7 messages using a custom port and TCP protocol.