Andrew Konken
Andrew Konken

Reputation: 352

Azure Function - What Happens to Processed Messages without Outputting Result?

I've written an Azure function and connected it to an IoT Hub's messaging endpoint to trigger the function for all incoming messages. The purpose of the function is to Decompress messages that were previously Compressed using GZIP prior to cellular transmission.

Currently we have the Devices transmitting to the cloud Uncompressed and we're looking to add compression to cut down on transmission costs. We're also currently using Stream Analytics to analyze the messages as they are in the Stream and output them to various hubs, blobs, tables, etc. So once the messages are compressed we will no longer be able to use the Stream Analytics for direction based on message values.

I've developed my Function to decompress the message and output the Result to an Event Hub for further processing.

My question is: If I don't output the content will the modified Message live in the queue until it is ingested by another application? Or will my changes disappear if I don't output the Result. And if the uncompressed message is able to live in the queue then will I still be able to use Stream Analytics as I currently have it configured to function.

Upvotes: 1

Views: 229

Answers (1)

Olivier Bloch
Olivier Bloch

Reputation: 662

It seems you are asking if Event Hub (the one you are pushing uncompressed messages to) will keep messages if they are not consumed straight away. The answer is yes. Event Hub has a retention policy that you can configure in the Azure portal. Furthermore you can look at the Event Hub archiving feature which allows to automatically push the messages to a blob storage. Once your uncompressed messages are in the event hub, then you can still use Stream Analytics as you used to for your processing.

You might also want to look into Azure IoT Hub routing which uses messages properties to send them to different custom enpoints without having to crack open the body of the message. That would allow you to do routing without having to decompress messages (if your scenarios allows for using the message properties)

Upvotes: 3

Related Questions