7

Is it possible to send azure queue messages to an endpoint url?

Filburt
  • 17,626
  • 12
  • 64
  • 115
mahesh sharma
  • 998
  • 1
  • 7
  • 21
  • Please describe your question in more details. – Gaurav Mantri Apr 05 '16 at 07:51
  • I have azure queue for storing messages and I want to send messages on a **web api end point url**. Is it possible by azure queue to send messages on specific endpoint url? – mahesh sharma Apr 05 '16 at 08:08
  • 1
    you can try azure functions. where in the incoming message to the queue can be the trigger and you write custom code in azure functions to pick up that message and send it to web api. or you can write a worker role which monitors the queue and does the same. – Aravind Apr 05 '16 at 08:11

2 Answers2

3

You could add a simple webjob with a QueueTrigger and call your endpoint from that.

public static void ProcessQueueMessage([QueueTrigger("queue")] string message,
        TextWriter log)
        {
            //call your endpoint and send "message" here
        }
Attila Szasz
  • 3,033
  • 3
  • 25
  • 39
2

Is it possible by azure queue to send messages on specific endpoint url?

To answer your question, No, an Azure Queue can't send message to a specific endpoint URL. An Azure Queue is simply a message store. You can send messages to a queue and it will reliably store the messages till the time they expire or you delete them.

However there are many ways by which you can get the message sent to an endpoint URL. As mentioned by @atika in his answer and @Aravind in his comments, you can use WebJobs or Functions. Essentially the idea is that there's someone (a WebJob or a Function) that is listening on the queue by constantly polling the queue and once it finds a message, it can send the message to an endpoint specified by you. Do keep in mind that WebJobs or Functions need to constantly poll the queue, fetch the message and take some action on that message based on how you code for it.

Gaurav Mantri
  • 128,066
  • 12
  • 206
  • 241