简体   繁体   中英

windows azure script services add message to queue

I'm using Windows Azure Mobile services to upload pictures from a mobile app. The mobile script services accepts the file, saves it's name to the database. What I'm trying to do is to be able to add a message to a queue which will resize the uploaded image. Do Script services supports calling queues from within or I have to make my app do that call? Thanks in advance

You can use the following code to send a message to the queue:

var azure = require('azure');
var queueService = azure.createQueueService("myaccount", "mykey");    
queueService.createQueueIfNotExists("myqueuename", function(error){ });
queueService.createMessage("myqueuename", "contentOfTheMessage", function(error){});

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM