What I want is to place a message on something like a queue which has a trigger [Can be a function app trigger] which is triggered some specified time after the message is received and not immediately as the Service Bus Queue Trigger currently works.
I do not want to implement waits within the function app during proccessing since this is expensive.
Problem Description: I have a system composed of two function apps and 1 service bus queue. The first function app has a http trigger that receives a http request transaction, validates it and sends the transaction message to the processing queue.
The second function app is a queue listener that receives the message from the second queue, calls an external API for a resource. I have to keep checking for the API to check my transaction status. This makes me to run a while loop within the request which keeps sleeping the thread for 5 seconds after which, I check for the status. I do not terminate the function app in order to keep making the requests. This becomes costly since the function apps are billed per time taken during request execution.
The challenge with a service bus queue function app queue trigger is that it won't wait to trigger the listener function to call the external API to check for the status of the transaction after 5 seconds from the time the message arrives at the queue. I want to trigger the function app queue listener 5 seconds after the message has been received by the queue. Not immediately it is received.
Is there (not necessarily a service bus queue) a service / component / Azure product/ solution that can help me achieve this?
Any extra advise / information is highly welcome
Thank you